Refactoring

This commit is contained in:
Isaac
2024-06-12 23:04:04 +04:00
parent 1b1846dc63
commit 9a075fa39e
360 changed files with 1830 additions and 1713 deletions

View File

@@ -15,7 +15,7 @@ public struct KeyShortcut: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.input)
hasher.combine(self.modifiers)
hasher.combine(self.modifiers.rawValue)
}
public static func ==(lhs: KeyShortcut, rhs: KeyShortcut) -> Bool {
@@ -23,12 +23,6 @@ public struct KeyShortcut: Hashable {
}
}
extension UIKeyModifierFlags: Hashable {
public var hashValue: Int {
return self.rawValue
}
}
extension KeyShortcut {
var uiKeyCommand: UIKeyCommand {
let command = UIKeyCommand(input: self.input, modifierFlags: self.modifiers, action: #selector(KeyShortcutsController.handleKeyCommand(_:)), discoverabilityTitle: self.title)