Skip to content

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

mobile: stop app updates check in beta

Ammar Ahmedaec183bd783b
diff --git a/apps/mobile/app/hooks/use-app-events.tsx b/apps/mobile/app/hooks/use-app-events.tsx
index 5be183924..257e542aa 100644
--- a/apps/mobile/app/hooks/use-app-events.tsx
+++ b/apps/mobile/app/hooks/use-app-events.tsx
@@ -98,6 +98,7 @@ import { getGithubVersion } from "../utils/github-version";
import { tabBarRef } from "../utils/global-refs";
import { sleep } from "../utils/time";
import Notifications from "../services/notifications";
+import { BETA } from "../utils/constants";
const onCheckSyncStatus = async (type: SyncStatusEvent) => {
const { disableSync, disableAutoSync } = SettingsService.get();
@@ -646,10 +647,8 @@ export const useAppEvents = () => {
useEffect(() => {
if (!loading) {
- (async () => {
- onUserUpdated();
- doAppLoadActions();
- })();
+ onUserUpdated();
+ doAppLoadActions();
}
}, [loading, onUserUpdated]);
@@ -710,14 +709,15 @@ const doAppLoadActions = async () => {
return;
}
notifee.setBadgeCount(0);
- await useMessageStore.getState().setAnnouncement();
- if (NewFeature.present()) return;
- if (await checkAppUpdateAvailable()) return;
if (!(await db.user.getUser())) {
setLoginMessage();
return;
}
+
+ await useMessageStore.getState().setAnnouncement();
+ if (NewFeature.present()) return;
+ if (await checkAppUpdateAvailable()) return;
if (await checkForRateAppRequest()) return;
if (await PremiumService.getRemainingTrialDaysStatus()) return;
if (SettingsService.get().introCompleted) {
@@ -731,7 +731,8 @@ const doAppLoadActions = async () => {
};
const checkAppUpdateAvailable = async () => {
- if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD) return;
+ if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD || BETA)
+ return;
try {
const version =
Config.GITHUB_RELEASE === "true"
diff --git a/apps/mobile/app/utils/constants.ts b/apps/mobile/app/utils/constants.ts
index 89fa6066b..33cf6c448 100644
--- a/apps/mobile/app/utils/constants.ts
+++ b/apps/mobile/app/utils/constants.ts
@@ -23,6 +23,8 @@ export const IOS_APPGROUPID = "group.org.streetwriters.notesnook";
export const FILE_SIZE_LIMIT = 500 * 1024 * 1024;
export const IMAGE_SIZE_LIMIT = 50 * 1024 * 1024;
+export const BETA = true;
+
export const STORE_LINK =
Platform.OS === "ios"
? "https://apps.apple.com/us/app/notesnook/id1544027013"