From c2a380d30823216a0ccd19c328faeef45184c873 Mon Sep 17 00:00:00 2001 From: Kanishk Kakar Date: Sat, 27 Oct 2018 23:22:14 +0530 Subject: [PATCH] setting: Disable beta updates if auto updates disabled. * Disable beta updates if auto updates disabled --- app/renderer/js/pages/preference/general-section.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/renderer/js/pages/preference/general-section.js b/app/renderer/js/pages/preference/general-section.js index f081573f..7f7ebf33 100644 --- a/app/renderer/js/pages/preference/general-section.js +++ b/app/renderer/js/pages/preference/general-section.js @@ -233,6 +233,10 @@ class GeneralSection extends BaseSection { clickHandler: () => { const newValue = !ConfigUtil.getConfigItem('autoUpdate'); ConfigUtil.setConfigItem('autoUpdate', newValue); + if (!newValue) { + ConfigUtil.setConfigItem('betaUpdate', false); + this.betaUpdateOption(); + } this.autoUpdateOption(); } }); @@ -244,8 +248,10 @@ class GeneralSection extends BaseSection { value: ConfigUtil.getConfigItem('betaUpdate', false), clickHandler: () => { const newValue = !ConfigUtil.getConfigItem('betaUpdate'); - ConfigUtil.setConfigItem('betaUpdate', newValue); - this.betaUpdateOption(); + if (ConfigUtil.getConfigItem('autoUpdate')) { + ConfigUtil.setConfigItem('betaUpdate', newValue); + this.betaUpdateOption(); + } } }); }