From 87ae988d5d2dff445ddb7db0e3d675b29a870a4d Mon Sep 17 00:00:00 2001 From: kytwb Date: Wed, 5 Jan 2022 19:13:39 +0100 Subject: #512 Restrict in-app update to Mac, Windows and AppImage --- src/stores/AppStore.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index fd7c58dfc..54a3e4d92 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -17,7 +17,7 @@ import { readJsonSync } from 'fs-extra'; import Store from './lib/Store'; import Request from './lib/Request'; import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; -import { isMac, electronVersion, osRelease } from '../environment'; +import { isMac, isWindows, electronVersion, osRelease } from '../environment'; import { ferdiVersion, userDataPath, ferdiLocale } from '../environment-remote'; import { generatedTranslations } from '../i18n/translations'; import { getLocale } from '../helpers/i18n-helpers'; @@ -382,15 +382,16 @@ export default class AppStore extends Store { } @action _checkForUpdates() { - if (this.isOnline) { + if (this.isOnline && this.stores.settings.app.automaticUpdates && (isMac || isWindows || process.env.APPIMAGE)) { debug('_checkForUpdates: sending event to autoUpdate:check'); this.updateStatus = this.updateStatusTypes.CHECKING; ipcRenderer.send('autoUpdate', { action: 'check', }); - if (this.stores.settings.app.automaticUpdates) { - this.actions.recipe.update(); - } + } + + if (this.isOnline && this.stores.settings.app.automaticUpdates) { + this.actions.recipe.update(); } } -- cgit v1.2.3-70-g09d2