Skip to content

Commit dc83cc0

Browse files
committed
feat(account): sort topics alphabetically by name
- Add sorting to the readAll() method in TopicsRepository - Sort topics by 'name' in ascending order - Add a TODO comment for potential future pagination implementation
1 parent cc048ae commit dc83cc0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/account/bloc/available_topics_bloc.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ class AvailableTopicsBloc
2828
}
2929
emit(state.copyWith(status: AvailableTopicsStatus.loading));
3030
try {
31-
final response = await _topicsRepository.readAll();
31+
// TODO(fulleni): Add pagination if necessary for very large datasets.
32+
final response = await _topicsRepository.readAll(
33+
sort: [const SortOption('name')],
34+
);
3235
emit(
3336
state.copyWith(
3437
status: AvailableTopicsStatus.success,

0 commit comments

Comments
 (0)