forked from shadowfacts/Tusker
Workaround for crash when pressing Cmd+1/2/... on macOS
See #253 The actions won't work, but it's better than crashing :/
This commit is contained in:
parent
f1a39c2faa
commit
948eff1f7e
|
@ -101,7 +101,11 @@ class MainSplitViewController: UISplitViewController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func handleSidebarItemCommand(_ command: UICommand) {
|
@objc func handleSidebarItemCommand(_ sender: AnyObject) {
|
||||||
|
// workaround for crash when sender is not a UICommand, see #253 and FB11804009
|
||||||
|
guard let command = sender as? UICommand else {
|
||||||
|
return
|
||||||
|
}
|
||||||
let item: MainSidebarViewController.Item
|
let item: MainSidebarViewController.Item
|
||||||
if let index = command.propertyList as? Int {
|
if let index = command.propertyList as? Int {
|
||||||
item = .tab(MainTabBarViewController.Tab(rawValue: index)!)
|
item = .tab(MainTabBarViewController.Tab(rawValue: index)!)
|
||||||
|
|
Loading…
Reference in New Issue