mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
update menu pins on notebook & topic delete
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user