From 8d023f0edd47be2800ea7f02a4efd062ee55c220 Mon Sep 17 00:00:00 2001 From: Quentin Decaunes Date: Sat, 23 Mar 2019 17:19:28 +0100 Subject: [PATCH] Enable last state to save apply checkbox properly. --- js/methods.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/methods.js b/js/methods.js index 2986c9e..e3c97a7 100644 --- a/js/methods.js +++ b/js/methods.js @@ -180,6 +180,9 @@ function saveLatestUsedSettings() { inputs.forEach(element => { let id = element.id; let value = element.value; + if (id.indexOf('apply_') === 0) { + value = element.checked; + } latest_controller_tabs_settings[id] = value; }); const settings = require('electron-settings'); @@ -202,10 +205,14 @@ function loadLatestUsedSettings() { const value = latest_controller_tabs_settings[id]; let input = document.getElementById(id); if (input) { + if (id.indexOf('apply_') === 0) { + input.checked = value; + } else { input.value = value; } } } + } if (document.isStarting && settings.get('settings.apply_last_settings_on_launch')) { applyRyzenSettings(); }