1
0
mirror of https://github.com/immich-app/immich.git synced 2025-01-27 17:28:09 +02:00

fix(web): delete trashed item (#8821)

* fix: delete trashed item

* fix: simplify
This commit is contained in:
martin 2024-04-15 22:21:54 +02:00 committed by GitHub
parent ed74213c63
commit 084a97a77a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,11 +71,13 @@
}; };
const onDelete = () => { const onDelete = () => {
if (!isTrashEnabled && $showDeleteModal) { const hasTrashedAsset = Array.from($selectedAssets).some((asset) => asset.isTrashed);
if ($showDeleteModal && (!isTrashEnabled || hasTrashedAsset)) {
isShowDeleteConfirmation = true; isShowDeleteConfirmation = true;
return; return;
} }
handlePromiseError(trashOrDelete(false)); handlePromiseError(trashOrDelete(hasTrashedAsset));
}; };
const onForceDelete = () => { const onForceDelete = () => {