Changes space subtitle in explore rooms from joined string to direct space parent

This commit is contained in:
ericdecanini 2022-06-07 10:10:22 +02:00 committed by Benoit Marty
parent a6113526d0
commit 6513210904
1 changed files with 1 additions and 3 deletions

View File

@ -199,9 +199,7 @@ class RoomSummaryItemFactory @Inject constructor(private val displayableEventFor
private fun getSearchResultSubtitle(roomSummary: RoomSummary): String {
val userId = roomSummary.directUserId
val spaceName = roomSummary.flattenParents
.takeIf { it.isNotEmpty() }
?.joinToString(", ") { it.name }
val spaceName = roomSummary.flattenParents.lastOrNull()?.name
val canonicalAlias = roomSummary.canonicalAlias
return (userId ?: spaceName ?: canonicalAlias).orEmpty()