Commit 1b57db8
committed
fix(feed_decorators): resolve content collection follow/unfollow logic
Fixes a compilation error in `ContentCollectionDecoratorWidget` caused by attempting to call non-existent toggle methods on the immutable `UserContentPreferences` model.
The follow/unfollow logic is now handled directly within the widget. It correctly creates a new list of followed items (topics or sources) and uses the `copyWith` method to generate an updated `UserContentPreferences` object before dispatching it to the `AppBloc`. This approach is robust and respects the immutability of the core data model.1 parent 8222a29 commit 1b57db8
File tree
1 file changed
+26
-4
lines changed- lib/feed_decorators/widgets
1 file changed
+26
-4
lines changedLines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
175 | 186 | | |
176 | | - | |
177 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
178 | 200 | | |
179 | 201 | | |
180 | 202 | | |
| |||
0 commit comments