mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
mobile: add option to disable auto update check
This commit is contained in:
committed by
Abdullah Atta
parent
3ecc43d976
commit
0fec38610c
@@ -341,8 +341,15 @@ const doAppLoadActions = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const checkAppUpdateAvailable = 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;
|
return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const version =
|
const version =
|
||||||
Config.GITHUB_RELEASE === "true"
|
Config.GITHUB_RELEASE === "true"
|
||||||
|
|||||||
@@ -670,6 +670,13 @@ export const settingsGroups: SettingSection[] = [
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
disabled: () => !db.settings.getDefaultNotebook()
|
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;
|
lastFullBackupDate?: number;
|
||||||
serverUrls?: Record<HostId, string>;
|
serverUrls?: Record<HostId, string>;
|
||||||
defaultSidebarTab: number;
|
defaultSidebarTab: number;
|
||||||
|
checkForUpdates?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type DimensionsType = {
|
type DimensionsType = {
|
||||||
@@ -196,7 +197,8 @@ export const defaultSettings: SettingStore["settings"] = {
|
|||||||
settingsVersion: 0,
|
settingsVersion: 0,
|
||||||
backupType: "partial",
|
backupType: "partial",
|
||||||
fullBackupReminder: "never",
|
fullBackupReminder: "never",
|
||||||
lastFullBackupDate: 0
|
lastFullBackupDate: 0,
|
||||||
|
checkForUpdates: true
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useSettingStore = create<SettingStore>((set, get) => ({
|
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.`,
|
roadmapDesc: () => t`See what the future of Notesnook is going to be like.`,
|
||||||
checkForUpdates: () => t`Check for updates`,
|
checkForUpdates: () => t`Check for updates`,
|
||||||
checkForUpdatesDesc: () => t`Check for new version of Notesnook`,
|
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`,
|
appVersion: () => t`App version`,
|
||||||
defaultSound: () => t`Default sound`,
|
defaultSound: () => t`Default sound`,
|
||||||
subNotSupported: () =>
|
subNotSupported: () =>
|
||||||
|
|||||||
Reference in New Issue
Block a user