Settings: make autostart toggle best-effort so it doesn't block save (dev builds)
This commit is contained in:
parent
5a6f5dd4fa
commit
97864374aa
1 changed files with 8 additions and 0 deletions
|
|
@ -44,9 +44,17 @@
|
|||
if (!settings) return;
|
||||
busy = true;
|
||||
err = null;
|
||||
|
||||
// Autostart toggle is best-effort — fails on dev builds where the exe
|
||||
// path is unstable (target\debug\). Don't let it block the save.
|
||||
try {
|
||||
if (settings.autostart) await enableAutostart();
|
||||
else await disableAutostart();
|
||||
} catch (e) {
|
||||
console.warn("autostart toggle failed (likely dev build):", e);
|
||||
}
|
||||
|
||||
try {
|
||||
await setSettings(settings);
|
||||
onClose();
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue