A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: impl permanent delete in multi select trash
thecodrrdeaecda5027a
diff --git a/apps/web/src/common/selectionoptions.js b/apps/web/src/common/selectionoptions.jsindex 5be8f7a96..2e2a1c656 100644--- a/apps/web/src/common/selectionoptions.js+++ b/apps/web/src/common/selectionoptions.js@@ -31,6 +31,7 @@ const DeleteOption = createOption("deleteOption", Icon.Trash, async function ()return;const item = state.selectedItems[0];+var isAnyNoteOpened = false;const items = state.selectedItems.map((item) => {if (item.id === editorStore.get().session.id) isAnyNoteOpened = true;@@ -38,6 +39,13 @@ const DeleteOption = createOption("deleteOption", Icon.Trash, async function (return item.id;});+ if (item.dateDeleted) {+ // we are in trash+ await db.trash.delete(...items);+ trashStore.refresh();+ return;+ }+if (isAnyNoteOpened) {editorStore.newSession();}