Skip to content

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

fix sync runs twice on login

ammarahm-edd23e092e32fa
diff --git a/apps/mobile/src/utils/hooks/useAppEvents.js b/apps/mobile/src/utils/hooks/useAppEvents.js
index 148c24fb6..947a85d9c 100644
--- a/apps/mobile/src/utils/hooks/useAppEvents.js
+++ b/apps/mobile/src/utils/hooks/useAppEvents.js
@@ -298,13 +298,6 @@ export const useAppEvents = () => {
try {
user = await db.user.getUser();
await PremiumService.setPremiumStatus();
- if (login) {
- console.log('sync started');
- await Sync.run();
- console.log('hide progress dialog');
- await sleep(300);
- eSendEvent(eCloseProgressDialog);
- }
setLastSynced(await db.lastSynced());
if (!user) {
return setLoginMessage();