diff --git a/Hot/Classes/ApplicationDelegate.swift b/Hot/Classes/ApplicationDelegate.swift index 346994c..c4589ea 100644 --- a/Hot/Classes/ApplicationDelegate.swift +++ b/Hot/Classes/ApplicationDelegate.swift @@ -354,7 +354,7 @@ class ApplicationDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate self.sensorViewControllers = controllers self.sensorsMenu.items = items.sorted { - $0.title.compare( $1.title, options: .numeric, range: nil, locale: nil ) == .orderedAscending + $0.title.compare( $1.title, options: [ .numeric, .caseInsensitive ], range: nil, locale: nil ) == .orderedAscending } } diff --git a/Hot/Classes/SelectSensorsWindowController.swift b/Hot/Classes/SelectSensorsWindowController.swift index c72ec7e..182f27c 100644 --- a/Hot/Classes/SelectSensorsWindowController.swift +++ b/Hot/Classes/SelectSensorsWindowController.swift @@ -55,7 +55,7 @@ public class SelectSensorsWindowController: NSWindowController, NSTableViewDeleg self.arrayController.sortDescriptors = [ - NSSortDescriptor( key: "name", ascending: true ), + NSSortDescriptor( key: "name", ascending: true, selector: #selector( NSString.localizedCaseInsensitiveCompare( _: ) ) ), ] self.windowOpenObserver = NotificationCenter.default.addObserver( forName: NSWindow.didBecomeKeyNotification, object: self.window, queue: nil )