fix: album picker show all albums (#27211)

This commit is contained in:
Daniel Dietzler 2026-03-24 01:08:57 +01:00 committed by GitHub
parent b456f78771
commit ff9ae24219
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,10 @@
let { onClose }: Props = $props();
onMount(async () => {
albums = await getAllAlbums({});
// TODO the server should *really* just return all albums (paginated ideally)
const ownedAlbums = await getAllAlbums({ shared: false });
ownedAlbums.push.apply(ownedAlbums, await getAllAlbums({ shared: true }));
albums = ownedAlbums;
recentAlbums = albums.sort((a, b) => (new Date(a.updatedAt) > new Date(b.updatedAt) ? -1 : 1)).slice(0, 3);
loading = false;
});