This commit is contained in:
Araxeus
2021-04-17 15:03:19 +03:00
parent 49698ea669
commit 12a2517697
3 changed files with 27 additions and 28 deletions

View File

@ -1,4 +1,4 @@
const { enabled } = require("./back")
const { enabled } = require("./back");
const { setOptions } = require("../../config/plugins");
module.exports = (win, options) => [
@ -7,13 +7,13 @@ module.exports = (win, options) => [
type: "checkbox",
checked: !!options.arrowsShortcut,
click: (item) => {
//dynamically change setting if plugin enabled
if (enabled()) {
win.webContents.send("setArrowsShortcut", item.checked);
} else { //fallback to usual method if disabled
options.arrowsShortcut = item.checked;
setOptions("precise-volume", options);
}
}
// Dynamically change setting if plugin enabled
if (enabled()) {
win.webContents.send("setArrowsShortcut", item.checked);
} else { // Fallback to usual method if disabled
options.arrowsShortcut = item.checked;
setOptions("precise-volume", options);
}
}
}
];