fix data not updating on sync

This commit is contained in:
ammarahm-ed
2021-01-04 13:11:00 +05:00
parent 4415b7ad4b
commit 6f3e0fcd04

View File

@@ -192,12 +192,14 @@ const LoginDialog = () => {
setStatus('Syncing Data');
dispatch({type: Actions.USER, user: user});
db.sync()
.catch((e) => {})
.catch((e) => {
console.log(e);
})
.finally(async () => {
dispatch({type: Actions.LAST_SYNC, lastSync: await db.lastSynced()});
dispatch({type: Actions.ALL});
eSendEvent(refreshNotesPage);
});
dispatch({type: Actions.ALL});
eSendEvent(refreshNotesPage);
clearMessage(dispatch);
if (!user.isEmailConfirmed) {
setEmailVerifyMessage(dispatch);