fix: apply hotkey changes immediately, reset stuck window session, retry hotkey after permission grant

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:38:49 +02:00
co-authored by Claude Sonnet 5.5
parent f510f02945
commit 15c9582e12
+11 -3
View File
@@ -160,12 +160,17 @@ final class AppModel: ObservableObject {
hotkey.binding = hotkeyBinding
settings.$hotkeyID
.sink { [weak self] _ in
.sink { [weak self] id in
guard let self else { return }
self.hotkey.binding = self.hotkeyBinding
self.hotkey.binding = HotkeyBinding.binding(id: id) ?? .fn
self.objectWillChange.send()
}
.store(in: &cancellables)
permissions.$inputMonitoring
.removeDuplicates()
.filter { $0 }
.sink { [weak self] _ in self?.retryHotkey() }
.store(in: &cancellables)
settings.$useCorrection
.sink { [corrector] in corrector.setEnabled($0) }
.store(in: &cancellables)
@@ -228,7 +233,10 @@ final class AppModel: ObservableObject {
func startWindowRecording() {
guard recordingBlocker == nil, state == .idle else { return }
policy.windowSession = true
Task { await controller.handle(.pressed) }
Task {
await controller.handle(.pressed)
if state != .recording { policy.windowSession = false }
}
}
func stopWindowRecording() {