mobile: disable auto sync

This commit is contained in:
Ammar Ahmed
2024-02-22 13:45:21 +05:00
committed by Abdullah Atta
parent 505d71f1c7
commit 2f17ad69a1
2 changed files with 10 additions and 6 deletions

View File

@@ -202,11 +202,14 @@ const onRequestPartialSync = async (
DatabaseLogger.info(
`onRequestPartialSync full:${full}, force:${force}, lastSyncTime:${lastSyncTime}`
);
if (full || force) {
await Sync.run("global", force, full, undefined, lastSyncTime);
} else {
await Sync.run("global", false, false, undefined, lastSyncTime);
}
DatabaseLogger.info("Auto sync is disabled");
// if (full || force) {
// await Sync.run("global", force, full, undefined, lastSyncTime);
// } else {
// await Sync.run("global", false, false, undefined, lastSyncTime);
// }
};
const onLogout = async (reason: string) => {

View File

@@ -114,7 +114,8 @@ async function onBackgroundSyncStarted() {
}
const user = await db.user?.getUser();
if (user) {
await db.sync(true, false);
// await db.sync(true, false);
DatabaseLogger.info("BACKGROUND SYNC DISABLED");
}
await Notifications.setupReminders();
DatabaseLogger.info("BACKGROUND SYNC COMPLETE");