diff --git a/web/src/lib/components/photos-page/asset-grid.svelte b/web/src/lib/components/photos-page/asset-grid.svelte index c8ca6b17a6..06b5627d1b 100644 --- a/web/src/lib/components/photos-page/asset-grid.svelte +++ b/web/src/lib/components/photos-page/asset-grid.svelte @@ -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 = () => {