mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
mobile: disable auto sync
This commit is contained in:
committed by
Abdullah Atta
parent
34f909e37f
commit
d920c73acb
@@ -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) => {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user