mobile: stop app updates check in beta

This commit is contained in:
Ammar Ahmed
2024-02-10 21:23:02 +05:00
parent 5c6fd953eb
commit 949f6ace54
2 changed files with 11 additions and 8 deletions

View File

@@ -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"

View File

@@ -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"