diff --git a/Sources/Sst/AppModel.swift b/Sources/Sst/AppModel.swift index a223e3d..9dc054a 100644 --- a/Sources/Sst/AppModel.swift +++ b/Sources/Sst/AppModel.swift @@ -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() {