Skip to content

Commit

Permalink
Sorting room list alphabetically case-insensitive. (#1851)
Browse files Browse the repository at this point in the history
* Sort Room list alphabetically but caseInsensitive

Signed-off-by: Nicolas Buquet <[email protected]>

* Sort Room list alphabetically but caseInsensitive

Signed-off-by: Nicolas Buquet <[email protected]>

* Sort Room list alphabetically but caseInsensitive

Signed-off-by: Nicolas Buquet <[email protected]>

---------

Signed-off-by: Nicolas Buquet <[email protected]>
Co-authored-by: Nicolas Buquet <[email protected]>
  • Loading branch information
NicolasBuquet and Nicolas Buquet authored May 8, 2024
1 parent 8ca9961 commit 30d49a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension MXRoomListDataSortable {
// }

if sortOptions.alphabetical {
result.append(NSSortDescriptor(keyPath: \MXRoomSummaryProtocol.displayName, ascending: true))
result.append(NSSortDescriptor(key: "displayName", ascending: true, selector: #selector(NSString.localizedStandardCompare(_:))))
}

if sortOptions.invitesFirst {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ extension MXCoreDataRoomListDataFetcher: MXRoomListDataSortable {
var result: [NSSortDescriptor] = []

if sortOptions.alphabetical {
result.append(NSSortDescriptor(keyPath: \MXRoomSummaryMO.s_displayName, ascending: true))
result.append(NSSortDescriptor(key: "s_displayName", ascending: true, selector: #selector(NSString.localizedStandardCompare(_:))))
}

if sortOptions.invitesFirst {
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-1851.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When sorting room list alphabetically, sort it case-insensitive.

0 comments on commit 30d49a6

Please sign in to comment.