performance optimizations

This commit is contained in:
ammarahm-ed
2021-06-02 17:34:39 +05:00
parent b10c646683
commit e3d4176102
38 changed files with 427 additions and 547 deletions

View File

@@ -126,10 +126,11 @@ const MoveNoteComponent = ({close, note, setNote}) => {
if (note && note.id) {
setNote({...db.notes.note(note.id).data});
sendNoteEditedEvent({
id: note.id,
forced: true,
});
Navigation.setRoutesToUpdate([
Navigation.routeNames.NotesPage,
Navigation.routeNames.Favorites,
Navigation.routeNames.Notes,
]);
}
dispatch({type: Actions.NOTEBOOKS});
@@ -149,10 +150,11 @@ const MoveNoteComponent = ({close, note, setNote}) => {
if (note && note.id) {
setNote({...db.notes.note(note.id).data});
sendNoteEditedEvent({
id: note.id,
forced: true,
});
Navigation.setRoutesToUpdate([
Navigation.routeNames.NotesPage,
Navigation.routeNames.Favorites,
Navigation.routeNames.Notes,
]);
}
dispatch({type: Actions.NOTEBOOKS});
};