@@ -101,20 +101,12 @@ final class AppState {
101101 /// pane can route the user to General's single Accessibility grant.
102102 var settingsTab : SettingsTab = . general
103103
104- /// The master on/off — "Enable LockIME". Mirrors `config.isEnabled`; gates
105- /// the whole app (both locking and switching). Bound by the General master
106- /// toggle.
104+ /// The single on/off — "Enable LockIME". Mirrors `config.isEnabled`; gates
105+ /// the whole app (both locking and switching). Bound by the General toggle,
106+ /// and what every state surface reflects (tray/About icon, menu glyph +
107+ /// "Enabled/Disabled" header, the locked-source checkmark).
107108 var isAppEnabled : Bool { config. isEnabled }
108109
109- /// Whether a **continuous lock** is in force right now: the master is on *and*
110- /// the lock sub-toggle is on. This is what the padlock surfaces represent
111- /// (tray/About icon, menu glyph + "Locked/Unlocked" header, the locked-source
112- /// checkmark) — they speak to the *lock* capability, not mere app activeness.
113- /// For anyone who leaves locking on (the default) this equals `isEnabled`, so
114- /// those surfaces look exactly as before; only the opt-in pure-switch mode
115- /// (master on, locking off) shows them "unlocked".
116- var isLocked : Bool { config. isEnabled && config. lockingEnabled }
117-
118110 /// The SwiftData container backing the activation log (for `.modelContainer`).
119111 var modelContainer : ModelContainer { logStore. container }
120112
@@ -229,17 +221,15 @@ final class AppState {
229221 updateController. onCheckOutcome = { [ weak self] outcome in self ? . presentUpdateOutcome ( outcome) }
230222 updateController. start ( )
231223
232- // Global toggle-lock shortcut: flips the master ("Enable LockIME") on/off,
233- // the app's quick stop/start. `lockingEnabled` persists across toggles, so
234- // a pure-switch user (locking off) toggling the app off then on stays in
235- // pure-switch mode rather than silently re-engaging the lock.
224+ // Global toggle-lock shortcut: flips "Enable LockIME" on/off — the
225+ // app's quick stop/start.
236226 KeyboardShortcuts . onKeyUp ( for: . toggleLock) { [ weak self] in
237227 guard let self else { return }
238228 self . setMasterEnabled ( !self . isAppEnabled)
239229 }
240230
241231 // Global "lock to previous/next source" — cycle the global target
242- // through the input-source list (wrapping), turning locking on.
232+ // through the input-source list (wrapping), turning LockIME on.
243233 KeyboardShortcuts . onKeyUp ( for: . globalPreviousSource) { [ weak self] in
244234 self ? . cycleGlobalSource ( . previous)
245235 }
@@ -343,39 +333,26 @@ final class AppState {
343333 commit ( reason: . lockEngaged)
344334 }
345335
346- /// Toggle the **continuous-lock** capability (the General "Enable locking"
347- /// sub-toggle), subordinate to the master. Turning it off drops every standing
348- /// lock — the global default, per-app `.locked` rules, URL `.lock` rules, and
349- /// the address-bar lock all go inert — while one-shot switch rules keep firing.
350- /// That is the "act like Input Source Pro" mode: per-context auto-switch with
351- /// no global lock. No effect while the master is off (the app is fully idle).
352- func setLockingEnabled( _ on: Bool ) {
353- config. lockingEnabled = on
354- commit ( reason: . lockEngaged)
355- }
356-
357336 func setDefaultSource( _ id: InputSourceID ? ) {
358337 config. defaultSourceID = id
359338 commit ( )
360339 }
361340
362341 /// Lock to a specific source from the menu bar: make it the global target and
363- /// engage the lock in a single commit — turning **both** the master and the
364- /// lock sub-toggle on, so a one-tap menu pick always pins, even from a
365- /// pure-switch or fully-off state. Clicking the already-locked source instead
366- /// clears the global target via `setDefaultSource(nil)` (leaving the app and
342+ /// turn LockIME on in a single commit, so a one-tap menu pick always pins,
343+ /// even from an off state. Clicking the already-locked source instead clears
344+ /// the global target via `setDefaultSource(nil)` (leaving the app and
367345 /// switching alive).
368346 func lockToSource( _ id: InputSourceID ) {
369347 config. defaultSourceID = id
370348 config. isEnabled = true
371- config. lockingEnabled = true
372349 commit ( reason: . lockEngaged)
373350 }
374351
375352 // MARK: - Shortcut-driven source cycling
376353
377354 /// Lock the *global* target to the previous/next input source in the list,
378- /// wrapping around the ends, and turn locking on — the same write path as
355+ /// wrapping around the ends, and turn LockIME on — the same write path as
379356 /// `lockToSource`. Never lands on "none", and does nothing when fewer than
380357 /// two input sources are installed (there's nowhere to cycle).
381358 func cycleGlobalSource( _ direction: CycleDirection ) {
@@ -385,7 +362,6 @@ final class AppState {
385362 ) else { return }
386363 config. defaultSourceID = next
387364 config. isEnabled = true
388- config. lockingEnabled = true
389365 commit ( reason: . lockEngaged)
390366 }
391367
0 commit comments