1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-03 05:46:58 +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

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 = () => {