Commit dd5c8b9
committed
feat(feed): prime HeadlinesFeedBloc with initial saved filters
Refactors the `HeadlinesFeedBloc` to accept an optional `initialUserContentPreferences` parameter in its constructor.
This change resolves a race condition where the BLoC would be created after the `AppBloc` had already loaded the user's data, causing the initial list of saved filters to be missed. By injecting the initial state, the `HeadlinesFeedBloc` is now immediately aware of the user's saved filters, ensuring the `SavedFiltersBar` is correctly populated for all users upon navigation to the feed.1 parent a1944ca commit dd5c8b9
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
38 | 49 | | |
| 50 | + | |
| 51 | + | |
39 | 52 | | |
40 | 53 | | |
41 | 54 | | |
| |||
0 commit comments