stop settings from stranding a recording and losing its own state

This commit is contained in:
2026-09-21 06:18:50 +03:00
parent c9ee532bd3
commit 371c910068
4 changed files with 27 additions and 7 deletions
+4 -2
View File
@@ -45,7 +45,7 @@
onMount(async () => {
cfg = await api.getConfig()
initialCfg = structuredClone(cfg)
initialCfg = $state.snapshot(cfg)
try { codecs = await api.codecAvailability() } catch { codecs = null }
})
@@ -84,9 +84,11 @@
if (failed.length > 0) {
hotkeyWarnings = [`${failed.join(", ")} - hotkey may be in use by another app`]
} else {
initialCfg = structuredClone(cfg)
initialCfg = $state.snapshot(cfg)
onClose()
}
} catch (e) {
hotkeyWarnings = [String(e)]
} finally { saving = false }
}