aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar kytwb <kytwb@pm.me>2022-01-05 19:13:39 +0100
committerLibravatar kytwb <kytwb@pm.me>2022-01-05 19:13:39 +0100
commit87ae988d5d2dff445ddb7db0e3d675b29a870a4d (patch)
treeefa62d567fcb2a1026a3f86e4a56b30db3ae82c4 /src/stores
parentRevert "#512 Show updates tab for Mac, Windows and AppImage only" (diff)
downloadferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.tar.gz
ferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.tar.zst
ferdium-app-87ae988d5d2dff445ddb7db0e3d675b29a870a4d.zip
#512 Restrict in-app update to Mac, Windows and AppImage
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js11
1 files changed, 6 insertions, 5 deletions
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';
17import Store from './lib/Store'; 17import Store from './lib/Store';
18import Request from './lib/Request'; 18import Request from './lib/Request';
19import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; 19import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config';
20import { isMac, electronVersion, osRelease } from '../environment'; 20import { isMac, isWindows, electronVersion, osRelease } from '../environment';
21import { ferdiVersion, userDataPath, ferdiLocale } from '../environment-remote'; 21import { ferdiVersion, userDataPath, ferdiLocale } from '../environment-remote';
22import { generatedTranslations } from '../i18n/translations'; 22import { generatedTranslations } from '../i18n/translations';
23import { getLocale } from '../helpers/i18n-helpers'; 23import { getLocale } from '../helpers/i18n-helpers';
@@ -382,15 +382,16 @@ export default class AppStore extends Store {
382 } 382 }
383 383
384 @action _checkForUpdates() { 384 @action _checkForUpdates() {
385 if (this.isOnline) { 385 if (this.isOnline && this.stores.settings.app.automaticUpdates && (isMac || isWindows || process.env.APPIMAGE)) {
386 debug('_checkForUpdates: sending event to autoUpdate:check'); 386 debug('_checkForUpdates: sending event to autoUpdate:check');
387 this.updateStatus = this.updateStatusTypes.CHECKING; 387 this.updateStatus = this.updateStatusTypes.CHECKING;
388 ipcRenderer.send('autoUpdate', { 388 ipcRenderer.send('autoUpdate', {
389 action: 'check', 389 action: 'check',
390 }); 390 });
391 if (this.stores.settings.app.automaticUpdates) { 391 }
392 this.actions.recipe.update(); 392
393 } 393 if (this.isOnline && this.stores.settings.app.automaticUpdates) {
394 this.actions.recipe.update();
394 } 395 }
395 } 396 }
396 397