Skip to content

Commit 46632fd

Browse files
committed
fix(headlines-feed): update country list to show only those with active sources
- Replace `availableCountries` with `countriesWithActiveSources` in country chip list - This change ensures that only countries with active news sources are displayed to the user
1 parent 1cb0247 commit 46632fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/headlines-feed/view/source_filter_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ class _SourceFilterView extends StatelessWidget {
253253
height: AppSpacing.xl + AppSpacing.md,
254254
child: ListView.separated(
255255
scrollDirection: Axis.horizontal,
256-
itemCount: state.availableCountries.length + 1,
256+
itemCount: state.countriesWithActiveSources.length + 1,
257257
separatorBuilder: (context, index) =>
258258
const SizedBox(width: AppSpacing.sm),
259259
itemBuilder: (context, index) {
@@ -269,7 +269,7 @@ class _SourceFilterView extends StatelessWidget {
269269
},
270270
);
271271
}
272-
final country = state.availableCountries[index - 1];
272+
final country = state.countriesWithActiveSources[index - 1];
273273
return ChoiceChip(
274274
avatar: country.flagUrl.isNotEmpty
275275
? CircleAvatar(

0 commit comments

Comments
 (0)