mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 10:03:28 +07:00
Enable last state to save apply checkbox properly.
This commit is contained in:
parent
0ad8107e4a
commit
8d023f0edd
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user