File tree 1 file changed +11
-0
lines changed
web/src/lib/components/album-page
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 35
35
locale ,
36
36
type AlbumViewSettings ,
37
37
} from ' $lib/stores/preferences.store' ;
38
+ import { userInteraction } from ' $lib/stores/user.svelte' ;
38
39
import { goto } from ' $app/navigation' ;
39
40
import { AppRoute } from ' $lib/constants' ;
40
41
import { t } from ' svelte-i18n' ;
293
294
sharedAlbums [sharedAlbums .findIndex (({ id }) => id === album .id )] = album ;
294
295
};
295
296
297
+ const updateRecentAlbumInfo = (album : AlbumResponseDto ) => {
298
+ if (userInteraction .recentAlbums ) {
299
+ const index = userInteraction .recentAlbums .findIndex ((recentAlbum ) => recentAlbum .id === album .id );
300
+ if (index !== - 1 ) {
301
+ userInteraction .recentAlbums [index ] = { ... userInteraction .recentAlbums [index ], ... album };
302
+ }
303
+ }
304
+ };
305
+
296
306
const successEditAlbumInfo = (album : AlbumResponseDto ) => {
297
307
albumToEdit = null ;
298
308
308
318
});
309
319
310
320
updateAlbumInfo (album );
321
+ updateRecentAlbumInfo (album );
311
322
};
312
323
313
324
const handleAddUsers = async (albumUsers : AlbumUserAddDto []) => {
You can’t perform that action at this time.
0 commit comments