Skip to content

Commit 1e6857d

Browse files
committed
fix(entity-details): filter active headlines only
- Add filter for active headlines in both readAll calls - Ensure consistency in filtering active content across the entity details bloc
1 parent e9a019d commit 1e6857d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/entity_details/bloc/entity_details_bloc.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
102102
filter['eventCountry.id'] = (entityToLoad as Country).id;
103103
}
104104

105+
// Always filter for active headlines.
106+
filter['status'] = ContentStatus.active.name;
107+
105108
final headlineResponse = await _headlinesRepository.readAll(
106109
filter: filter,
107110
pagination: const PaginationOptions(limit: _headlinesLimit),
@@ -270,6 +273,9 @@ class EntityDetailsBloc extends Bloc<EntityDetailsEvent, EntityDetailsState> {
270273
filter['eventCountry.id'] = (state.entity! as Country).id;
271274
}
272275

276+
// Always filter for active headlines.
277+
filter['status'] = ContentStatus.active.name;
278+
273279
final headlineResponse = await _headlinesRepository.readAll(
274280
filter: filter,
275281
pagination: PaginationOptions(

0 commit comments

Comments
 (0)