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 { 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 { 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();