Deal more gracefully with absent choices
这个提交包含在:
父节点
b7628c8c65
当前提交
ccba71cc2e
@ -111,7 +111,7 @@ class ASHardware {
|
|||||||
if choices.count <= 10 {
|
if choices.count <= 10 {
|
||||||
menu.addSortedChoices([ASPropertyEntry](choices.values), target: target, selector: selector)
|
menu.addSortedChoices([ASPropertyEntry](choices.values), target: target, selector: selector)
|
||||||
} else {
|
} else {
|
||||||
menu.addSortedChoices(recentChoices.map({ (recent: String) in choices[recent]! }), target: target, selector: selector)
|
menu.addSortedChoices(recentChoices.flatMap({ (recent: String) in choices[recent] }), target: target, selector: selector)
|
||||||
menu.addItem(NSMenuItem.separatorItem())
|
menu.addItem(NSMenuItem.separatorItem())
|
||||||
var seen = [String: Bool]()
|
var seen = [String: Bool]()
|
||||||
for prop in choices.values {
|
for prop in choices.values {
|
||||||
|
正在加载...
x
在新工单中引用
屏蔽一个用户