Skip to content

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

web: update last synced time on sync complete

Abdullah Attaaba2b0ea19fa
diff --git a/apps/web/src/stores/app-store.js b/apps/web/src/stores/app-store.js
index 119b3d661..63248aad0 100644
--- a/apps/web/src/stores/app-store.js
+++ b/apps/web/src/stores/app-store.js
@@ -125,8 +125,9 @@ class AppStore extends BaseStore {
this.updateSyncStatus("failed");
});
- db.eventManager.subscribe(EVENTS.syncCompleted, () => {
- this.updateSyncStatus("synced", false);
+ db.eventManager.subscribe(EVENTS.syncCompleted, async () => {
+ await this.updateLastSynced();
+ this.updateSyncStatus("completed", true);
count = 0;
this.refresh();
});