From d0579cb59b1815ac59cb46d79292fe92e405bde9 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Fri, 21 May 2021 09:56:17 +0200 Subject: [PATCH] Which user expects spaces to be sorted by id? Use the display name Change-Id: Ic843ca00bef6dcbf0eac2c4931dea7668c9edc04 --- .../im/vector/app/features/spaces/SpaceSummaryController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt index 536649ca26..fabd5a8e2f 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt @@ -37,6 +37,7 @@ import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.room.model.SpaceChildInfo import org.matrix.android.sdk.api.session.room.summary.RoomAggregateNotificationCount import org.matrix.android.sdk.api.util.toMatrixItem +import java.util.Locale import javax.inject.Inject class SpaceSummaryController @Inject constructor( @@ -140,7 +141,7 @@ class SpaceSummaryController @Inject constructor( } rootSpaces - ?.sortedBy { it.roomId } + ?.sortedBy { it.displayName.toLowerCase(Locale.getDefault()) } ?.forEach { groupSummary -> val isSelected = selected is RoomGroupingMethod.BySpace && groupSummary.roomId == selected.space()?.roomId // does it have children?