From 85ab153839d537e9b0f80033dec32b368e66a924 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Fri, 8 Jan 2021 13:00:55 +0500 Subject: [PATCH] update menu pins on notebook & topic delete --- apps/mobile/src/utils/functions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/utils/functions.js b/apps/mobile/src/utils/functions.js index a177db41d..ca9ed3263 100644 --- a/apps/mobile/src/utils/functions.js +++ b/apps/mobile/src/utils/functions.js @@ -29,8 +29,8 @@ export const deleteItems = async (item) => { let it = topics[i]; await db.notebooks.notebook(it.notebookId).topics.delete(it.id); } - updateEvent({type: Actions.NOTEBOOKS}); + updateEvent({type: Actions.MENU_PINS}); eSendEvent(eOnNewTopicAdded); ToastEvent.show('Topics deleted', 'success'); } @@ -40,6 +40,7 @@ export const deleteItems = async (item) => { await db.notebooks.delete(...ids); updateEvent({type: Actions.NOTEBOOKS}); updateEvent({type: Actions.NOTES}); + updateEvent({type: Actions.MENU_PINS}); } let msgPart = history.selectedItemsList.length === 1 ? ' item' : ' items'; @@ -64,12 +65,12 @@ export const deleteItems = async (item) => { updateEvent({type: Actions.NOTEBOOKS}); updateEvent({type: Actions.NOTES}); updateEvent({type: Actions.TRASH}); + updateEvent({type: Actions.MENU_PINS}); ToastEvent.hide(); }, 'Undo', ); } - updateEvent({type: Actions.TRASH}); updateEvent({type: Actions.CLEAR_SELECTION}); updateEvent({type: Actions.SELECTION_MODE, enabled: false});