update menu pins on notebook & topic delete

This commit is contained in:
ammarahm-ed
2021-01-08 13:00:55 +05:00
parent 750f9c770f
commit 85ab153839

View File

@@ -29,8 +29,8 @@ export const deleteItems = async (item) => {
let it = topics[i]; let it = topics[i];
await db.notebooks.notebook(it.notebookId).topics.delete(it.id); await db.notebooks.notebook(it.notebookId).topics.delete(it.id);
} }
updateEvent({type: Actions.NOTEBOOKS}); updateEvent({type: Actions.NOTEBOOKS});
updateEvent({type: Actions.MENU_PINS});
eSendEvent(eOnNewTopicAdded); eSendEvent(eOnNewTopicAdded);
ToastEvent.show('Topics deleted', 'success'); ToastEvent.show('Topics deleted', 'success');
} }
@@ -40,6 +40,7 @@ export const deleteItems = async (item) => {
await db.notebooks.delete(...ids); await db.notebooks.delete(...ids);
updateEvent({type: Actions.NOTEBOOKS}); updateEvent({type: Actions.NOTEBOOKS});
updateEvent({type: Actions.NOTES}); updateEvent({type: Actions.NOTES});
updateEvent({type: Actions.MENU_PINS});
} }
let msgPart = history.selectedItemsList.length === 1 ? ' item' : ' items'; let msgPart = history.selectedItemsList.length === 1 ? ' item' : ' items';
@@ -64,12 +65,12 @@ export const deleteItems = async (item) => {
updateEvent({type: Actions.NOTEBOOKS}); updateEvent({type: Actions.NOTEBOOKS});
updateEvent({type: Actions.NOTES}); updateEvent({type: Actions.NOTES});
updateEvent({type: Actions.TRASH}); updateEvent({type: Actions.TRASH});
updateEvent({type: Actions.MENU_PINS});
ToastEvent.hide(); ToastEvent.hide();
}, },
'Undo', 'Undo',
); );
} }
updateEvent({type: Actions.TRASH}); updateEvent({type: Actions.TRASH});
updateEvent({type: Actions.CLEAR_SELECTION}); updateEvent({type: Actions.CLEAR_SELECTION});
updateEvent({type: Actions.SELECTION_MODE, enabled: false}); updateEvent({type: Actions.SELECTION_MODE, enabled: false});