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
parent adf8c5fb9f
commit 89e528d552
1 changed files with 1 additions and 3 deletions

View File

@ -207,9 +207,7 @@ class RoomSummaryItemFactory @Inject constructor(
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()