From aba2b0ea19fa3548c69e9009b53f9c51a0ec0f0d Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 6 Jul 2023 10:51:43 +0500 Subject: [PATCH] web: update last synced time on sync complete --- apps/web/src/stores/app-store.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); });