mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 01:56:16 -08:00
fix(settings): keep the parental lock switch on the saved state and roll back to the recovered value
The Settings switch snaps back to the saved state when clicked and follows it once the PIN action succeeds, so a cancelled or refused PIN no longer leaves it showing the opposite state. A failed switch write is undone to the value read after the settings retry instead of the hard-coded inverse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed48e7fd2b
commit
8d11f674cf
6 files changed
+129
-5
No files matched your search
@@ -173,7 +173,11 @@ settings switch BEFORE the PIN is stored, since `enabled` follows `hasPin`
|
||||
while the switch is unknown); the Electron mirror write is awaited
|
||||
next, and a mirror that cannot be written undoes the settings write the
|
||||
same way — the toggle never shows a state the next launch will not have,
|
||||
on either side.
|
||||
on either side. The undo restores the value read AFTER the settings retry
|
||||
(not the hard-coded inverse, which a recovered read may already hold). The
|
||||
Settings switch itself only requests the change: it snaps back to the
|
||||
saved state at once and follows `enabled()` when the PIN action succeeds,
|
||||
so a cancelled or refused PIN leaves it showing the real state.
|
||||
|
||||
### In-memory catalogs
|
||||
|
||||
|
||||
Reference in new issue
Block a user