Skip to content

Commit

Permalink
Fix issue where subscriptions in drawer are not in alphabetical order (
Browse files Browse the repository at this point in the history
  • Loading branch information
hjiangsu authored Jan 10, 2024
1 parent d771c3f commit e63ff75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixed
- Fixed issue where Thunder was being locked to 60Hz on 120Hz displays on Android
- Fixed issue where subscriptions list in drawer is not respecting alphabetical order

## 0.2.7 - 2024-01-03
## Added
Expand Down
2 changes: 1 addition & 1 deletion lib/account/bloc/account_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AccountBloc extends Bloc<AccountEvent, AccountState> {
}

// Sort subscriptions by their name
subsciptions.sort((CommunityView a, CommunityView b) => a.community.name.compareTo(b.community.name));
subsciptions.sort((CommunityView a, CommunityView b) => a.community.title.toLowerCase().compareTo(b.community.title.toLowerCase()));

List<Favorite> favorites = await Favorite.favorites(account.id);
favoritedCommunities = subsciptions.where((CommunityView communityView) => favorites.any((Favorite favorite) => favorite.communityId == communityView.community.id)).toList();
Expand Down

0 comments on commit e63ff75

Please sign in to comment.