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;
|
if (!settings) return;
|
||||||
busy = true;
|
busy = true;
|
||||||
err = null;
|
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 {
|
try {
|
||||||
if (settings.autostart) await enableAutostart();
|
if (settings.autostart) await enableAutostart();
|
||||||
else await disableAutostart();
|
else await disableAutostart();
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("autostart toggle failed (likely dev build):", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
await setSettings(settings);
|
await setSettings(settings);
|
||||||
onClose();
|
onClose();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue