1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Electron: allow disabling auto-updates

This commit is contained in:
Laurent Cozic 2017-11-21 19:37:34 +00:00
parent 367a18db93
commit 48b648e656
2 changed files with 4 additions and 1 deletions

View File

@ -336,7 +336,9 @@ class Application extends BaseApplication {
// but then doesn't install it on exit.
if (shim.isWindows() || shim.isMac()) {
const runAutoUpdateCheck = function() {
bridge().checkForUpdatesAndNotify(Setting.value('profileDir') + '/log-autoupdater.txt');
if (Setting.value('autoUpdateEnabled')) {
bridge().checkForUpdatesAndNotify(Setting.value('profileDir') + '/log-autoupdater.txt');
}
}
setTimeout(() => { runAutoUpdateCheck() }, 5000);

View File

@ -388,6 +388,7 @@ Setting.metadata_ = {
}},
'showAdvancedOptions': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['mobile' ], label: () => _('Show advanced options') },
'noteVisiblePanes': { value: ['editor', 'viewer'], type: Setting.TYPE_ARRAY, public: false, appTypes: ['desktop'] },
'autoUpdateEnabled': { value: true, type: Setting.TYPE_BOOL, public: true, appTypes: ['desktop'], label: () => _('Automatically update the application') },
};
// Contains constants that are set by the application and