web: fix sync not running after login

This commit is contained in:
Abdullah Atta
2024-02-23 19:29:32 +05:00
parent 484fc4f5a4
commit f14a72ec1c
2 changed files with 4 additions and 2 deletions

View File

@@ -118,7 +118,9 @@ class AppStore extends BaseStore<AppStore> {
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);
}
);

View File

@@ -122,7 +122,7 @@ class UserStore extends BaseStore<UserStore> {
await db.user.authenticatePassword(
email,
password,
null,
undefined,
sessionExpired
);
Config.set("encryptBackups", true);