diff --git a/apps/web/src/stores/app-store.ts b/apps/web/src/stores/app-store.ts index 582a665c9..a00ca68c2 100644 --- a/apps/web/src/stores/app-store.ts +++ b/apps/web/src/stores/app-store.ts @@ -83,6 +83,7 @@ class AppStore extends BaseStore { // this needs to happen here so reminders can be set on app load. reminderStore.refresh(); announcementStore.refresh(); + this.get().sync({ type: "full" }); EV.subscribe(EVENTS.appRefreshRequested, () => this.refresh()); db.eventManager.subscribe(EVENTS.syncCompleted, () => this.refresh()); @@ -128,6 +129,7 @@ class AppStore extends BaseStore { // a slight delay to make sure sockets are open and can be connected // to. Otherwise, this fails miserably. await networkCheck.waitForInternet(); + await this.get().sync({ type: "full" }); await db.connectSSE({ force: true }).catch(logger.error); } }); @@ -136,6 +138,7 @@ class AppStore extends BaseStore { if (documentHidden) return; logger.info("Page visibility changed. Reconnecting SSE..."); + await this.get().sync({ type: "full" }); await db.connectSSE({ force: false }).catch(logger.error); }); };