mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
mobile: add option to disable auto update check
This commit is contained in:
@@ -341,8 +341,15 @@ const doAppLoadActions = async () => {
|
||||
};
|
||||
|
||||
const checkAppUpdateAvailable = async () => {
|
||||
if (__DEV__ || Config.isTesting === "true" || Config.FDROID_BUILD || BETA)
|
||||
if (
|
||||
__DEV__ ||
|
||||
Config.isTesting === "true" ||
|
||||
Config.FDROID_BUILD ||
|
||||
BETA ||
|
||||
!SettingsService.getProperty("checkForUpdates")
|
||||
)
|
||||
return;
|
||||
|
||||
try {
|
||||
const version =
|
||||
Config.GITHUB_RELEASE === "true"
|
||||
|
||||
@@ -670,6 +670,13 @@ export const settingsGroups: SettingSection[] = [
|
||||
});
|
||||
},
|
||||
disabled: () => !db.settings.getDefaultNotebook()
|
||||
},
|
||||
{
|
||||
id: "disable-update-check",
|
||||
type: "switch",
|
||||
name: strings.autoUpdateCheck(),
|
||||
description: strings.autoUpdateCheckDesc(),
|
||||
property: "checkForUpdates"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -98,6 +98,7 @@ export type Settings = {
|
||||
lastFullBackupDate?: number;
|
||||
serverUrls?: Record<HostId, string>;
|
||||
defaultSidebarTab: number;
|
||||
checkForUpdates?: boolean;
|
||||
};
|
||||
|
||||
type DimensionsType = {
|
||||
@@ -196,7 +197,8 @@ export const defaultSettings: SettingStore["settings"] = {
|
||||
settingsVersion: 0,
|
||||
backupType: "partial",
|
||||
fullBackupReminder: "never",
|
||||
lastFullBackupDate: 0
|
||||
lastFullBackupDate: 0,
|
||||
checkForUpdates: true
|
||||
};
|
||||
|
||||
export const useSettingStore = create<SettingStore>((set, get) => ({
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1285,6 +1285,9 @@ $headline$: Use starting line of the note as title.`,
|
||||
roadmapDesc: () => t`See what the future of Notesnook is going to be like.`,
|
||||
checkForUpdates: () => t`Check for updates`,
|
||||
checkForUpdatesDesc: () => t`Check for new version of Notesnook`,
|
||||
autoUpdateCheck: () => t`Check for updates automatically`,
|
||||
autoUpdateCheckDesc: () =>
|
||||
t`Check for new version of the app available on app launch`,
|
||||
appVersion: () => t`App version`,
|
||||
defaultSound: () => t`Default sound`,
|
||||
subNotSupported: () =>
|
||||
|
||||
Reference in New Issue
Block a user