From 9943b4cbc341c6ffc0da85e19a5f22ed5f67e08c Mon Sep 17 00:00:00 2001 From: imakida Date: Wed, 15 Jan 2025 11:13:16 -1000 Subject: [PATCH] fix(web): end selection after click when choosing thumbnail, and notify (#15373) fix(web): Change viewMode state after updateThumbnail Fixes #14692 viewMode state was being changed before updateThumbnail which caused AssetGrid.handleSelectAssets() to continue, instead of returning. Also added notification to notify user that the album cover was updated. --- .../[[photos=photos]]/[[assetId=id]]/+page.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte index 4a29f5d8694b32..289b16a24acd4f 100644 --- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -357,10 +357,10 @@ return; } + await updateThumbnail(assetId); + viewMode = AlbumPageViewMode.VIEW; assetInteraction.clearMultiselect(); - - await updateThumbnail(assetId); }; const updateThumbnailUsingCurrentSelection = async () => { @@ -379,6 +379,10 @@ albumThumbnailAssetId: assetId, }, }); + notificationController.show({ + type: NotificationType.Info, + message: $t('album_cover_updated'), + }); } catch (error) { handleError(error, $t('errors.unable_to_update_album_cover')); }