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
correctly update global state on change
ammarahm-ed04c802c01545
diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/AddTopicDialog/index.jsindex e21920295..2c9d0d145 100644--- a/apps/mobile/src/components/AddTopicDialog/index.js+++ b/apps/mobile/src/components/AddTopicDialog/index.js@@ -14,6 +14,8 @@ import {opacity, ph, pv, SIZE, WEIGHT} from '../../utils/SizeUtils';import {db} from '../../utils/DB';import {DDS} from '../../services/DeviceDetection';import Seperator from '../Seperator';+import { updateEvent } from '../DialogManager/recievers';+import { Actions } from '../../provider/Actions';export class AddTopicDialog extends React.Component {constructor(props) {@@ -41,6 +43,7 @@ export class AddTopicDialog extends React.Component {await db.notebooks.notebook(topic.notebookId).topics.add(topic);}this.close();+ updateEvent({type:Actions.NOTEBOOKS})eSendEvent(eOnNewTopicAdded);};diff --git a/apps/mobile/src/views/Editor/Functions.js b/apps/mobile/src/views/Editor/Functions.jsindex 674a97d26..778e06a2b 100644--- a/apps/mobile/src/views/Editor/Functions.js+++ b/apps/mobile/src/views/Editor/Functions.js@@ -308,7 +308,7 @@ async function addToCollection(id) {editing.actionAfterFirstSave = {type: null,};-+ updateEvent({type: Actions.NOTEBOOKS});break;}case 'tag': {@@ -317,6 +317,7 @@ async function addToCollection(id) {type: null,};+ updateEvent({type: Actions.TAGS});break;}case 'color': {@@ -325,7 +326,7 @@ async function addToCollection(id) {editing.actionAfterFirstSave = {type: null,};-+ updateEvent({type: Actions.COLORS});break;}default: {