Skip to content

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

web: refresh app on sync completed

Abdullah Attaaf9a83117b77
diff --git a/apps/web/src/stores/app-store.ts b/apps/web/src/stores/app-store.ts
index b83a20899..90ac00e38 100644
--- a/apps/web/src/stores/app-store.ts
+++ b/apps/web/src/stores/app-store.ts
@@ -89,6 +89,7 @@ class AppStore extends BaseStore<AppStore> {
announcementStore.refresh();
EV.subscribe(EVENTS.appRefreshRequested, () => this.refresh());
+ db.eventManager.subscribe(EVENTS.syncCompleted, () => this.refresh());
db.eventManager.subscribe(EVENTS.syncProgress, ({ type, current }) => {
this.set((state) => {
@@ -150,13 +151,13 @@ class AppStore extends BaseStore<AppStore> {
await this.updateLastSynced();
await resetNotices();
await noteStore.refresh();
- notebookStore.refresh();
- reminderStore.refresh();
- trashStore.refresh();
- tagStore.refresh();
- attachmentStore.refresh();
- monographStore.refresh();
- settingStore.refresh();
+ await notebookStore.refresh();
+ await reminderStore.refresh();
+ await trashStore.refresh();
+ await tagStore.refresh();
+ await attachmentStore.refresh();
+ await monographStore.refresh();
+ await settingStore.refresh();
await editorstore.refresh();
await this.refreshNavItems();