Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix backup does not run some times

ammarahm-ed678698abb570
diff --git a/apps/mobile/src/components/launcher/index.js b/apps/mobile/src/components/launcher/index.js
index 0ed3fd20f..032bdf3d0 100644
--- a/apps/mobile/src/components/launcher/index.js
+++ b/apps/mobile/src/components/launcher/index.js
@@ -112,19 +112,20 @@ const Launcher = React.memo(
return;
}
await useMessageStore.getState().setAnnouncement();
- if (NewFeature.present()) return;
- if (await checkAppUpdateAvailable()) return;
- if (await checkForRateAppRequest()) return;
- if (await checkNeedsBackup()) return;
- if (await PremiumService.getRemainingTrialDaysStatus()) return;
+
if (PremiumService.get() && user) {
if (SettingsService.get().reminder === 'off') {
SettingsService.set({ reminder: 'daily' });
}
if (BackupService.checkBackupRequired()) {
- sleep(2000).then(() => BackupService.checkAndRun());
+ sleep(2000).then(() => BackupService.run());
}
}
+ if (NewFeature.present()) return;
+ if (await checkAppUpdateAvailable()) return;
+ if (await checkForRateAppRequest()) return;
+ if (await checkNeedsBackup()) return;
+ if (await PremiumService.getRemainingTrialDaysStatus()) return;
if (introCompleted) {
useMessageStore.subscribe(state => {
@@ -175,7 +176,7 @@ const Launcher = React.memo(
let rateApp = SettingsService.get().rateApp;
if (rateApp && rateApp < Date.now() && !useMessageStore.getState().message?.visible) {
setRateAppMessage();
- return true;
+ return false;
}
return false;
};