crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit a294cfab29be5c3ffea530c22e05282307e971c6
parent cfdf5f4db73b4e3b33378e6466d8b4e8cce87417
Author: Michael Camilleri <[email protected]>
Date:   Thu,  7 May 2026 01:22:48 +0900

Fix concurrency warning about isolation

Diffstat:
MCrossmate/Views/HardwareKeyboardInputView.swift | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Crossmate/Views/HardwareKeyboardInputView.swift b/Crossmate/Views/HardwareKeyboardInputView.swift @@ -90,16 +90,18 @@ struct HardwareKeyboardInputView: UIViewRepresentable { } @objc private func handleKeyCommand(_ command: UIKeyCommand) { - guard let event = HardwareKeyboardEvent(command: command) else { return } + guard let event = HardwareKeyboardEvent( + characters: command.input ?? "", + modifierFlags: command.modifierFlags + ) else { return } _ = onPress?(event) } } } private extension HardwareKeyboardEvent { - init?(command: UIKeyCommand) { + init?(characters: String, modifierFlags: UIKeyModifierFlags) { let keyCode: UIKeyboardHIDUsage - let characters = command.input ?? "" switch characters { case UIKeyCommand.inputLeftArrow: @@ -135,7 +137,7 @@ private extension HardwareKeyboardEvent { self.init( keyCode: keyCode, charactersIgnoringModifiers: characters, - modifierFlags: command.modifierFlags + modifierFlags: modifierFlags ) } }