Fix incorrect ordering of machines with mixed upper/lowercase
This commit is contained in:
@@ -94,7 +94,7 @@ class SwitchesViewController: UIViewController,
|
||||
{
|
||||
// sort devices by name
|
||||
self.devices.sort(by: { (d1: WemoDevice, d2: WemoDevice) -> Bool in
|
||||
return (d1.name.compare(d2.name) == .orderedAscending)
|
||||
return (d1.name.compare(d2.name, options: .caseInsensitive, range: nil, locale: nil) == .orderedAscending)
|
||||
})
|
||||
|
||||
let hash = self.devices.reduce(0, {$0 ^ $1.hashValue})
|
||||
|
||||
Reference in New Issue
Block a user