Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix adding topic

ammarahm-ed9eb5f8c87f81
diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/AddTopicDialog/index.js
index 2ed08774f..0567ce153 100644
--- a/apps/mobile/src/components/AddTopicDialog/index.js
+++ b/apps/mobile/src/components/AddTopicDialog/index.js
@@ -25,10 +25,11 @@ export class AddTopicDialog extends React.Component {
if (!this.title)
return ToastEvent.show('Title is required', 'error', 3000, () => {}, '');
- await db.notebooks.notebook(this.props.notebookID).topics.add(this.title),
- eSendEvent(eOnNewTopicAdded);
- ToastEvent.show('New topic added', 'success', 3000, () => {}, '');
+ await db.notebooks.notebook(this.props.notebookID).topics.add(this.title);
this.close();
+ eSendEvent(eOnNewTopicAdded);
+
+ ToastEvent.show('New topic added', 'success', 3000, () => {}, '');
};
open() {
diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.js
index d21f1b7db..772922f20 100644
--- a/apps/mobile/src/components/Dialog/index.js
+++ b/apps/mobile/src/components/Dialog/index.js
@@ -39,7 +39,7 @@ export class Dialog extends Component {
history.selectedItemsList = [];
history.selectedItemsList.push(item);
}
- console.log(history.selectedItemsList.length, 'BREAK', item);
+
history.selectedItemsList.forEach(async i => {
if (i.type === 'note') {
await db.notes.delete(i.id);
diff --git a/apps/mobile/src/components/NotebookItem/index.js b/apps/mobile/src/components/NotebookItem/index.js
index ff33ca29d..88c93ab8b 100644
--- a/apps/mobile/src/components/NotebookItem/index.js
+++ b/apps/mobile/src/components/NotebookItem/index.js
@@ -230,8 +230,7 @@ export const NotebookItem = ({
'Delete',
];
- let columnItems =
- item.type === 'topic' ? [] : ['Pin', 'Favorite'];
+ let columnItems = item.type === 'topic' ? [] : ['Pin'];
ActionSheetEvent(item, false, false, rowItems, columnItems, {
notebookID: notebookID,