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: cache editor content before saving
Abdullah Attab94af68265e1
diff --git a/apps/web/src/components/editor/index.tsx b/apps/web/src/components/editor/index.tsxindex 8423411b2..ad480d961 100644--- a/apps/web/src/components/editor/index.tsx+++ b/apps/web/src/components/editor/index.tsx@@ -145,7 +145,7 @@ export default function EditorManager({if (!isOldSession) return;openSession(noteId);- }, [openSession, noteId, isOldSession, isReadonly]);+ }, [noteId]);return (<Flex@@ -295,8 +295,7 @@ function EditorChrome(props: PropsWithChildren<EditorProps>) {<Toolbar /><FlexScrollContainerclassName="editorScroll"- style={{}}- viewStyle={{ display: "flex", flexDirection: "column" }}+ style={{ display: "flex", flexDirection: "column" }}><Flexvariant="columnFill"diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.jsindex 853bb3016..2c55d591d 100644--- a/apps/web/src/stores/editor-store.js+++ b/apps/web/src/stores/editor-store.js@@ -161,6 +161,8 @@ class EditorStore extends BaseStore {this.setSaveState(0);try {+ if (session.content) this.get().session.content = session.content;+const id = await this._getSaveFn()({ ...session, id: sessionId });if (currentSession && currentSession.id !== sessionId) {noteStore.refresh();@@ -196,9 +198,6 @@ class EditorStore extends BaseStore {attachmentStore.refresh();}- if (session.content) {- this.get().session.content = session.content;- }this.set((state) => {if (!!state.session.id && state.session.id !== note.id) return;