From c9a8f36ade1452ce9af7c796f6877db21fa69f91 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 23 Feb 2024 19:29:32 +0500 Subject: [PATCH] web: fix sync not running after login --- apps/web/src/stores/app-store.ts | 4 +++- apps/web/src/stores/user-store.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/src/stores/app-store.ts b/apps/web/src/stores/app-store.ts index ebdaf1a49..3a3722b9d 100644 --- a/apps/web/src/stores/app-store.ts +++ b/apps/web/src/stores/app-store.ts @@ -118,7 +118,9 @@ class AppStore extends BaseStore { async (full, force, lastSynced) => { if (!this.get().isAutoSyncEnabled) return; - // await this.get().sync(full, force, lastSynced); + // TODO: remove this + if ((await db.lastSynced()) === 0) + await this.get().sync(full, force, lastSynced); } ); diff --git a/apps/web/src/stores/user-store.ts b/apps/web/src/stores/user-store.ts index 53fa6d599..7b47bf76c 100644 --- a/apps/web/src/stores/user-store.ts +++ b/apps/web/src/stores/user-store.ts @@ -122,7 +122,7 @@ class UserStore extends BaseStore { await db.user.authenticatePassword( email, password, - null, + undefined, sessionExpired ); Config.set("encryptBackups", true);