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 topic dialog
ammarahm-ed8a8c39b4dca3
diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/AddTopicDialog/index.jsindex e81259a11..4b3402b01 100644--- a/apps/mobile/src/components/AddTopicDialog/index.js+++ b/apps/mobile/src/components/AddTopicDialog/index.js@@ -39,7 +39,6 @@ export class AddTopicDialog extends React.Component {if (!this.props.toEdit) {await db.notebooks.notebook(this.notebook.id).topics.add(this.title);-} else {let topic = this.props.toEdit;topic.title = this.title;@@ -62,14 +61,16 @@ export class AddTopicDialog extends React.Component {open = async (notebookId) => {let id = notebookId || this.props.notebookID;- //console.log(notebookId)- this.notebook = await db.notebooks.notebook(id).data++ this.notebook = await db.notebooks.notebook(id).data;this.setState({visible: true,});};close = () => {+ this.props.close();this.title = null;+ this.notebook = null;this.setState({visible: false,});@@ -107,12 +108,7 @@ export class AddTopicDialog extends React.Component {<DialogButtonspositiveTitle={toEdit ? 'Save' : 'Add'}- onPressNegative={() => {- this.title = null;- this.setState({- visible: false,- });- }}+ onPressNegative={() => this.close()}onPressPositive={this.addNewTopic}/></DialogContainer>diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.jsindex 093c4449f..730485dc1 100644--- a/apps/mobile/src/components/DialogManager/index.js+++ b/apps/mobile/src/components/DialogManager/index.js@@ -350,6 +350,12 @@ export class DialogManager extends Component {ref={(ref) => (this.addTopicsDialog = ref)}toEdit={item?.type === 'topic' ? item : null}notebookID={item?.type !== 'topic' ? item.id : item.notebookId}+ close={() => {+ console.log("closing")+ this.setState({+ item:{}+ })+ }}colors={colors}/><AddNotebookDialog