Skip to content

Commit 7404421

Browse files
committed
fix(headlines-feed): add active content filter to headlines query
- Add a filter for active content in the headlines query - Ensure only content with status 'active' is included in the results - This change affects the `HeadlinesFeedBloc` class in the `headlines_feed_bloc.dart` file
1 parent a34c393 commit 7404421

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/headlines-feed/bloc/headlines_feed_bloc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class HeadlinesFeedBloc extends Bloc<HeadlinesFeedEvent, HeadlinesFeedState> {
8484
r'$in': filter.eventCountries!.map((c) => c.id).toList(),
8585
};
8686
}
87+
// Always filter for active content.
88+
queryFilter['status'] = ContentStatus.active.name;
8789
// Note: The `selectedSourceCountryIsoCodes` and `selectedSourceSourceTypes`
8890
// fields are used exclusively for UI-side filtering on the `SourceFilterPage`
8991
// and are not included in the backend query for headlines. Source filtering

0 commit comments

Comments
 (0)