0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 00:50:23 -05:00

fix(web): bypass the onStackAssets shortcut when only one is selected (#8559)

Selecting one asset and pressing 's' would show 'Stacked 1 assets'
and result in a noop. This change prevents the notification and
exiting the select mode.
This commit is contained in:
Guillermo 2024-04-06 07:28:39 -06:00 committed by GitHub
parent 8f981b6052
commit a2e38270e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,10 +87,12 @@
}; };
const onStackAssets = async () => { const onStackAssets = async () => {
await stackAssets(Array.from($selectedAssets), (ids) => { if ($selectedAssets.size > 1) {
assetStore.removeAssets(ids); await stackAssets(Array.from($selectedAssets), (ids) => {
dispatch('escape'); assetStore.removeAssets(ids);
}); dispatch('escape');
});
}
}; };
$: shortcutList = (() => { $: shortcutList = (() => {