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
fix delta being overwritten with id
ammarahm-ed1dbd1564b2a2
diff --git a/apps/mobile/src/components/SelectionHeader/index.js b/apps/mobile/src/components/SelectionHeader/index.jsindex e1e847109..122553a4b 100644--- a/apps/mobile/src/components/SelectionHeader/index.js+++ b/apps/mobile/src/components/SelectionHeader/index.js@@ -127,7 +127,7 @@ export const SelectionHeader = ({navigation}) => {dispatch({type: ACTIONS.SELECTION_MODE, enabled: false});dispatch({type: ACTIONS.NOTES});dispatch({type: ACTIONS.CLEAR_SELECTION});- ToastEvent.show('Notes added to favorites');+ ToastEvent.show('Notes added to favorites', 'success');}}}><Icon@@ -188,12 +188,12 @@ export const SelectionHeader = ({navigation}) => {});await db.trash.restore(...noteIds);+console.log(noteIds);dispatch({type: ACTIONS.TRASH});dispatch({type: ACTIONS.SELECTION_MODE, enabled: false});-dispatch({type: ACTIONS.CLEAR_SELECTION});- ToastEvent.show('Notes moved to trash');+ ToastEvent.show('Restore complete', 'success');}}}><Icondiff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.jsindex ed3c86a1b..d78329f52 100755--- a/apps/mobile/src/views/Editor/index.js+++ b/apps/mobile/src/views/Editor/index.js@@ -273,6 +273,7 @@ const Editor = ({navigation, noMenu}) => {id = note.id;dateEdited = note.dateEdited;content = note.content;+ content.delta = await db.notes.note(id).delta();saveCounter = 0;if (title !== null || title === '') {@@ -297,12 +298,10 @@ const Editor = ({navigation, noMenu}) => {} else if (note.content.delta) {let delta;- if (!note.content.delta.includes('_note_delta')) {+ if (typeof note.content.delta !== 'string') {delta = note.content.delta;} else {delta = await db.notes.note(id).delta();-- console.log(delta, 'sending delta', note.id);}post(JSON.stringify(delta));