Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Corrected state management issue in BookmarkMonumentsBloc #190 #237

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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
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.

1 participant