mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
fix: #42 revamped start on boot as it was still causing error for some users.
This commit is contained in:
parent
27b835c2c2
commit
9d01b070d3
@ -630,14 +630,16 @@ function updateScheduledStartOnBoot(toBeEnabled) {
|
|||||||
});
|
});
|
||||||
autoLaunch.isEnabled().then((isEnabled) => {
|
autoLaunch.isEnabled().then((isEnabled) => {
|
||||||
console.log(`toBeEnabled: ${toBeEnabled} isEnabled: ${isEnabled}`);
|
console.log(`toBeEnabled: ${toBeEnabled} isEnabled: ${isEnabled}`);
|
||||||
if (toBeEnabled && !isEnabled) {
|
|
||||||
autoLaunch.enable();
|
|
||||||
} else {
|
|
||||||
try {
|
try {
|
||||||
|
if (isEnabled) {
|
||||||
autoLaunch.disable();
|
autoLaunch.disable();
|
||||||
} catch (error) {
|
|
||||||
console.log("WARNING: Unable to disable start on boot. Is autoLaunch already disabled?", error);
|
|
||||||
}
|
}
|
||||||
|
if (toBeEnabled) {
|
||||||
|
autoLaunch.enable();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("WARNING: Unable to manage start on boot.", error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user