You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(feed): prioritize explicit savedFilter to fix selection race condition
Refactors the `_onHeadlinesFeedFiltersApplied` handler to prioritize the optional `event.savedFilter` when determining the `activeFilterId`.
Previously, when saving and applying a new filter, a race condition occurred where the `HeadlinesFeedBloc` would perform its comparison logic before its state was updated with the new filter from `AppBloc`, causing it to incorrectly select the "Custom" chip.
This change ensures that if `event.savedFilter` is provided, its ID is used directly, bypassing the comparison logic and guaranteeing the correct new filter is selected. The comparison logic is retained as a fallback for all other filter application scenarios.
0 commit comments