Skip to content

Commit 11ae653

Browse files
committed
feat(headlines-feed): add sorting options for countries fetching
- Add descending sort by 'name' when fetching all countries - Add descending sort by 'updatedAt' when fetching more countries
1 parent 87f34c4 commit 11ae653

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/headlines-feed/bloc/countries_filter_bloc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class CountriesFilterBloc
5353
try {
5454
final response = await _countriesRepository.readAll(
5555
pagination: const PaginationOptions(limit: _countriesLimit),
56+
sort: [const SortOption('name', SortOrder.desc)],
5657
);
5758
emit(
5859
state.copyWith(
@@ -85,6 +86,7 @@ class CountriesFilterBloc
8586
limit: _countriesLimit,
8687
cursor: state.cursor,
8788
),
89+
sort: [const SortOption('updatedAt', SortOrder.desc)],
8890
);
8991
emit(
9092
state.copyWith(

0 commit comments

Comments
 (0)