Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix data not updating on sync

ammarahm-ed6f3e0fcd04ee
diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.js
index 71aeb6592..7d1dad692 100644
--- a/apps/mobile/src/components/LoginDialog/index.js
+++ b/apps/mobile/src/components/LoginDialog/index.js
@@ -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);