Skip to content

Commit baa2418

Browse files
committed
Case-insensitive sorting
1 parent 0e3b873 commit baa2418

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Hot/Classes/ApplicationDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class ApplicationDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate
354354
self.sensorViewControllers = controllers
355355
self.sensorsMenu.items = items.sorted
356356
{
357-
$0.title.compare( $1.title, options: .numeric, range: nil, locale: nil ) == .orderedAscending
357+
$0.title.compare( $1.title, options: [ .numeric, .caseInsensitive ], range: nil, locale: nil ) == .orderedAscending
358358
}
359359
}
360360

Hot/Classes/SelectSensorsWindowController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class SelectSensorsWindowController: NSWindowController, NSTableViewDeleg
5555

5656
self.arrayController.sortDescriptors =
5757
[
58-
NSSortDescriptor( key: "name", ascending: true ),
58+
NSSortDescriptor( key: "name", ascending: true, selector: #selector( NSString.localizedCaseInsensitiveCompare( _: ) ) ),
5959
]
6060

6161
self.windowOpenObserver = NotificationCenter.default.addObserver( forName: NSWindow.didBecomeKeyNotification, object: self.window, queue: nil )

0 commit comments

Comments
 (0)