mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-13 18:58:53 +01:00
Fix albums not sorted correctly
This commit is contained in:
parent
1ab320fe76
commit
bc6c247a78
1 changed files with 7 additions and 7 deletions
|
@ -362,14 +362,14 @@ class _HomeAlbumsState extends State<HomeAlbums> {
|
|||
final sortedAlbums = albums.map((e) {
|
||||
// find the latest file in this album
|
||||
try {
|
||||
final lastItem = e.items
|
||||
.whereType<AlbumFileItem>()
|
||||
.map((e) => e.file)
|
||||
.where((element) => file_util.isSupportedFormat(element))
|
||||
.sorted(compareFileDateTimeDescending)
|
||||
.first;
|
||||
return Tuple2(
|
||||
e.items
|
||||
.whereType<AlbumFileItem>()
|
||||
.map((e) => e.file)
|
||||
.where((element) => file_util.isSupportedFormat(element))
|
||||
.sorted(compareFileDateTimeDescending)
|
||||
.first
|
||||
.lastModified,
|
||||
lastItem.metadata?.exif?.dateTimeOriginal ?? lastItem.lastModified,
|
||||
e);
|
||||
} catch (_) {
|
||||
return Tuple2(e.lastUpdated, e);
|
||||
|
|
Loading…
Reference in a new issue