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
web: fix note not selected after switching from locked note
Abdullah Atta6d8e5a1d1d1e
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.tsindex 8a83ceb5b..2d7e47255 100644--- a/apps/web/src/stores/editor-store.ts+++ b/apps/web/src/stores/editor-store.ts@@ -138,7 +138,13 @@ class EditorStore extends BaseStore<EditorStore> {const session = this.get().session;if (session.id) await db.fs().cancel(session.id);- if (session.id === noteId && !force) return;+ if (session.id === noteId && !force) {+ noteStore.get().setSelectedNote(noteId);+ setDocumentTitle(+ settingStore.get().hideNoteTitle ? undefined : session.title+ );+ return;+ }if (session.state === SESSION_STATES.unlocked) {this.set((state) => {@@ -152,7 +158,7 @@ class EditorStore extends BaseStore<EditorStore> {(await db.notes.note(noteId)) || (await db.notes.trashed(noteId));if (!note) return;- noteStore.setSelectedNote(note.id);+ noteStore.get().setSelectedNote(note.id);setDocumentTitle(settingStore.get().hideNoteTitle ? undefined : note.title);if (await db.vaults.itemExists(note))