mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Refactoring
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user