mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-29 00:20:04 +01:00
mobile: enable auto sync
This commit is contained in:
committed by
Abdullah Atta
parent
b80dd8c81e
commit
4e5b5e6e3f
@@ -203,13 +203,11 @@ const onRequestPartialSync = async (
|
||||
`onRequestPartialSync full:${full}, force:${force}, lastSyncTime:${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);
|
||||
// }
|
||||
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,8 +114,7 @@ async function onBackgroundSyncStarted() {
|
||||
}
|
||||
const user = await db.user?.getUser();
|
||||
if (user) {
|
||||
// await db.sync(true, false);
|
||||
DatabaseLogger.info("BACKGROUND SYNC DISABLED");
|
||||
await db.sync(true, false);
|
||||
}
|
||||
await Notifications.setupReminders();
|
||||
DatabaseLogger.info("BACKGROUND SYNC COMPLETE");
|
||||
|
||||
Reference in New Issue
Block a user