fix(web): reset select all button state on escape press (#13600)

* factor out cancel multiselect state logic to utils

* use cancel multiselct helper in album page

* use cancel multiselct helper in album-viewer component

* use cancel multiselct helper in asset-grid component

* remove unused to fix lint
This commit is contained in:
Darrel
2024-10-21 02:11:00 +08:00
committed by GitHub
parent ee0130a58b
commit 45517ab7ae
5 changed files with 14 additions and 17 deletions
@@ -40,7 +40,7 @@
import { SlideshowNavigation, SlideshowState, slideshowStore } from '$lib/stores/slideshow.store';
import { preferences, user } from '$lib/stores/user.store';
import { handlePromiseError } from '$lib/utils';
import { downloadAlbum } from '$lib/utils/asset-utils';
import { downloadAlbum, cancelMultiselect } from '$lib/utils/asset-utils';
import { openFileUploadDialog } from '$lib/utils/file-uploader';
import { handleError } from '$lib/utils/handle-error';
import {
@@ -270,7 +270,7 @@
return;
}
if ($isMultiSelectState) {
assetInteractionStore.clearMultiselect();
cancelMultiselect(assetInteractionStore);
return;
}
await goto(backUrl);