Skip to content

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

fix: send sync complete event on sync failed at login

ammarahm-ed7b246a22a93c
diff --git a/apps/mobile/src/services/sync.js b/apps/mobile/src/services/sync.js
index 9be904952..b329508ce 100644
--- a/apps/mobile/src/services/sync.js
+++ b/apps/mobile/src/services/sync.js
@@ -1,4 +1,5 @@
import NetInfo from '@react-native-community/netinfo';
+import { EVENTS } from 'notes-core/common';
import { getNote, updateNoteInEditor } from '../screens/editor/Functions';
import { initialize, useUserStore } from '../stores/stores';
import { doInBackground } from '../utils';
@@ -50,7 +51,7 @@ const run = async (context = 'global', forced = false, full = true) => {
if (getNote()?.id) {
await updateNoteInEditor();
}
-
+ db.eventManager.publish(EVENTS.syncCompleted);
console.log('sync done');
userstore.setSyncing(false);
}