fix(web): recent albums sort (#14545)

This commit is contained in:
Michel Heusschen
2024-12-07 17:24:00 +01:00
committed by GitHub
parent e2b36476e7
commit 5e955a1b03
2 changed files with 29 additions and 3 deletions

View File

@@ -10,9 +10,7 @@
onMount(async () => {
try {
const allAlbums = await getAllAlbums({});
albums = allAlbums
.sort((album1, album2) => (album1.lastModifiedAssetTimestamp! > album2.lastModifiedAssetTimestamp! ? 1 : 0))
.slice(0, 3);
albums = allAlbums.sort((a, b) => (a.updatedAt > b.updatedAt ? -1 : 1)).slice(0, 3);
} catch (error) {
handleError(error, $t('failed_to_load_assets'));
}