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 => {
|
inputs.forEach(element => {
|
||||||
let id = element.id;
|
let id = element.id;
|
||||||
let value = element.value;
|
let value = element.value;
|
||||||
|
if (id.indexOf('apply_') === 0) {
|
||||||
|
value = element.checked;
|
||||||
|
}
|
||||||
latest_controller_tabs_settings[id] = value;
|
latest_controller_tabs_settings[id] = value;
|
||||||
});
|
});
|
||||||
const settings = require('electron-settings');
|
const settings = require('electron-settings');
|
||||||
@ -202,10 +205,14 @@ function loadLatestUsedSettings() {
|
|||||||
const value = latest_controller_tabs_settings[id];
|
const value = latest_controller_tabs_settings[id];
|
||||||
let input = document.getElementById(id);
|
let input = document.getElementById(id);
|
||||||
if (input) {
|
if (input) {
|
||||||
|
if (id.indexOf('apply_') === 0) {
|
||||||
|
input.checked = value;
|
||||||
|
} else {
|
||||||
input.value = value;
|
input.value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (document.isStarting && settings.get('settings.apply_last_settings_on_launch')) {
|
if (document.isStarting && settings.get('settings.apply_last_settings_on_launch')) {
|
||||||
applyRyzenSettings();
|
applyRyzenSettings();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user