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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user