web: update last synced time on sync complete

This commit is contained in:
Abdullah Atta
2023-07-06 10:51:43 +05:00
committed by Abdullah Atta
parent 0894637b61
commit aba2b0ea19

View File

@@ -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();
});