Skip to content

Conversation

@dikshantbhangala
Copy link

#190 done

Changes Done:

  1. Error Handling Improvements:
  • Added proper error handling in the BookmarkMonumentsBloc for the following methods:
  • _mapBookmarkMonumentToState
  • _mapUnbookmarkMonumentToState
  • _mapCheckIfMonumentIsBookmarkedToState
  • _mapGetBookmarkedMonumentsToState
  • Ensured the application emits the correct error state (BookmarkedMonumentsErrorState) when exceptions occur.
  1. State Management Fixes:
  • Replaced the undefined BookmarkMonumentsError with BookmarkedMonumentsErrorState to resolve the crash caused by undefined states.
  1. Consistent State Emission:
  • Modified the bloc methods to emit updated states (BookmarkedMonumentsLoaded) after bookmarking or unbookmarking a monument.
  • Ensured state consistency when checking if a monument is bookmarked or retrieving the list of bookmarked monuments.

4.Bug Fix:

  • Fixed the issue where bookmarked monuments disappeared when viewing a monument’s detail page by ensuring state updates propagate correctly.

5.Code Refactor:

  • Improved readability and maintainability by structuring bloc methods and catching exceptions for each operation.s

@dikshantbhangala
Copy link
Author

@mdmohsin7 @jddeep plz review this pr and tell me any required modification needed?

@dikshantbhangala dikshantbhangala changed the title Fix: Corrected state management issue in BookmarkMonumentsBloc Fix: Corrected state management issue in BookmarkMonumentsBloc #190 Jan 23, 2025
@mdmohsin7
Copy link
Member

Hi @dikshantbhangala, could you please share a video demo of the fix? Also, try to avoid including unrelated changes in PRs, as they make the review process more difficult. It's best to focus solely on fixing the issue mentioned in the tagged ticket. This helps keep PRs clean, making them easier to review and roll back if needed.

@dikshantbhangala
Copy link
Author

@mdmohsin7 ok ! I will share the demo video!

@mdmohsin7
Copy link
Member

Hi @dikshantbhangala, any update?

@mdmohsin7 mdmohsin7 marked this pull request as draft March 13, 2025 11:51
@dikshantbhangala dikshantbhangala marked this pull request as ready for review March 14, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants