Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: single note is not deleting

thecodrr2a7309238bb5
diff --git a/apps/web/src/common/multi-select.ts b/apps/web/src/common/multi-select.ts
index 7f8410da8..cf3f05499 100644
--- a/apps/web/src/common/multi-select.ts
+++ b/apps/web/src/common/multi-select.ts
@@ -23,17 +23,11 @@ async function moveNotesToTrash(notes: any[]) {
if (item.locked && !(await Vault.unlockNote(item.id))) return;
}
- var isAnyNoteOpened = false;
const items = notes.map((item) => {
- if (item.id === editorStore.get().session.id) isAnyNoteOpened = true;
if (item.locked || db.monographs.isPublished(item.id)) return 0;
return item.id;
});
- if (isAnyNoteOpened) {
- hashNavigate("/notes/create", { addNonce: true });
- }
-
await TaskManager.startTask({
type: "status",
id: "deleteNotes",
diff --git a/apps/web/src/components/list-item/index.js b/apps/web/src/components/list-item/index.js
index 022267dd2..491036a4b 100644
--- a/apps/web/src/components/list-item/index.js
+++ b/apps/web/src/components/list-item/index.js
@@ -68,7 +68,7 @@ function ListItem(props) {
let title = props.item.title;
let selectedItems = selectionStore.get().selectedItems.slice();
- if (isSelected) {
+ if (isSelected || isFocused) {
title = `${selectedItems.length} items selected`;
items = items.filter((item) => item.multiSelect);
} else if (Config.get("debugMode", false)) {
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js
index 58cbe3e2c..00c47b788 100644
--- a/apps/web/src/stores/note-store.js
+++ b/apps/web/src/stores/note-store.js
@@ -76,7 +76,7 @@ class NoteStore extends BaseStore {
}
}
- await db.notes.delete(ids);
+ await db.notes.delete(...ids);
this.refresh();
appStore.refreshNavItems();