1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02: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 () => {
await stackAssets(Array.from($selectedAssets), (ids) => {
assetStore.removeAssets(ids);
dispatch('escape');
});
if ($selectedAssets.size > 1) {
await stackAssets(Array.from($selectedAssets), (ids) => {
assetStore.removeAssets(ids);
dispatch('escape');
});
}
};
$: shortcutList = (() => {