Skip to content

Commit 9867853

Browse files
committed
feat(content_management): sort sources, topics, and countries lists by name
- When loading sources, topics, and countries for the edit headline form, the lists are now sorted alphabetically by name in ascending order. - This change improves the user experience by providing a consistent and predictable order for these lists in the application.
1 parent ee8bbfc commit 9867853

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/content_management/bloc/edit_headline/edit_headline_bloc.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ class EditHeadlineBloc extends Bloc<EditHeadlineEvent, EditHeadlineState> {
5353
countriesResponse,
5454
] = await Future.wait([
5555
_headlinesRepository.read(id: _headlineId),
56-
_sourcesRepository.readAll(),
57-
_topicsRepository.readAll(),
58-
_countriesRepository.readAll(),
56+
_sourcesRepository.readAll(
57+
sort: [const SortOption('name', SortOrder.asc)],
58+
),
59+
_topicsRepository.readAll(
60+
sort: [const SortOption('name', SortOrder.asc)],
61+
),
62+
_countriesRepository.readAll(
63+
sort: [const SortOption('name', SortOrder.asc)],
64+
),
5965
]);
6066

6167
final headline = headlineResponse as Headline;

0 commit comments

Comments
 (0)