diff --git a/apps/web/src/common/multi-select.ts b/apps/web/src/common/multi-select.ts index a364f768a..e737064d5 100644 --- a/apps/web/src/common/multi-select.ts +++ b/apps/web/src/common/multi-select.ts @@ -8,9 +8,9 @@ import Vault from "./vault"; import { showItemDeletedToast } from "./toasts"; import { TaskManager } from "./task-manager"; -async function moveNotesToTrash(notes: any[]) { +async function moveNotesToTrash(notes: any[], confirm = true) { const item = notes[0]; - if (!(await showMultiDeleteConfirmation(notes.length))) return; + if (confirm && !(await showMultiDeleteConfirmation(notes.length))) return; if (notes.length === 1) { if ( diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js index b1c96aecf..3ab58d6a6 100644 --- a/apps/web/src/components/note/index.js +++ b/apps/web/src/components/note/index.js @@ -377,7 +377,7 @@ const menuItems = [ items.length === 1 && db.monographs.isPublished(items[0].id), disableReason: "Please unpublish this note to move it to trash", onClick: async ({ items }) => { - await Multiselect.moveNotesToTrash(items); + await Multiselect.moveNotesToTrash(items, items.length > 1); }, multiSelect: true, },