Sort keys in the correct order.

This commit is contained in:
Damiano Galassi committed 2017-08-17 08:25:15 +02:00
1 parent 7bc19929a4
commit a772c499f7
1 file changed
+1 -1
+1 -1
View File
@@ -73,7 +73,7 @@ import Cocoa
let sortDescriptor = NSSortDescriptor(keyPath: \MetadataResultMapItem.key, ascending: true) { obj1, obj2 -> ComparisonResult in let sortDescriptor = NSSortDescriptor(keyPath: \MetadataResultMapItem.key, ascending: true) { obj1, obj2 -> ComparisonResult in
if let right = context.index(of: obj1 as! String), if let right = context.index(of: obj1 as! String),
let left = context.index(of: obj2 as! String) { let left = context.index(of: obj2 as! String) {
return right < left ? .orderedDescending : .orderedAscending return right > left ? .orderedDescending : .orderedAscending
} }
return .orderedSame return .orderedSame
} }