1
0
mirror of https://github.com/immich-app/immich.git synced 2025-01-13 15:35:15 +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 = () => {
if (!isTrashEnabled && $showDeleteModal) {
const hasTrashedAsset = Array.from($selectedAssets).some((asset) => asset.isTrashed);
if ($showDeleteModal && (!isTrashEnabled || hasTrashedAsset)) {
isShowDeleteConfirmation = true;
return;
}
handlePromiseError(trashOrDelete(false));
handlePromiseError(trashOrDelete(hasTrashedAsset));
};
const onForceDelete = () => {