1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-15 08:16:48 +01:00

Sort albums in backup selection alphabetically with Recent (isAll) at top.

This commit is contained in:
Tom graham 2024-12-27 21:28:55 +11:00
parent c0aa2e52c3
commit afca978b88

View file

@ -1,3 +1,4 @@
import 'package:collection/collection.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/entities/album.entity.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
@ -15,7 +16,9 @@ class AlbumMediaRepository implements IAlbumMediaRepository {
await PhotoManager.getAssetPathList(
hasAll: true,
);
return assetPathEntities.map(_toAlbum).toList();
return assetPathEntities.map(_toAlbum).sortedBy((a) {
return a.isAll ? "" : a.name.toLowerCase();
}).toList();
}
@override