Fix | Explore room list: the RoomId is displayed instead of name (#3371)
This commit is contained in:
parent
201f4c342a
commit
cb6f414c60
|
@ -13,6 +13,7 @@ Bugfix 🐛:
|
|||
- Fix a problem with database migration on nightly builds (#3335)
|
||||
- Implement a workaround to render <del> and <u> in the timeline (#1817)
|
||||
- Make sure the SDK can retrieve the secret storage if the system is upgraded (#3304)
|
||||
- Spaces | Explore room list: the RoomId is displayed instead of name (#3371)
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
|
|
@ -30,5 +30,7 @@ data class SpaceChildInfo(
|
|||
val autoJoin: Boolean,
|
||||
val viaServers: List<String>,
|
||||
val parentRoomId: String?,
|
||||
val suggested: Boolean?
|
||||
val suggested: Boolean?,
|
||||
val canonicalAlias: String?,
|
||||
val aliases: List<String>?
|
||||
)
|
||||
|
|
|
@ -159,4 +159,4 @@ fun RoomMemberSummary.toMatrixItem() = MatrixItem.UserItem(userId, displayName,
|
|||
|
||||
fun SenderInfo.toMatrixItem() = MatrixItem.UserItem(userId, disambiguatedDisplayName, avatarUrl)
|
||||
|
||||
fun SpaceChildInfo.toMatrixItem() = MatrixItem.RoomItem(childRoomId, name, avatarUrl)
|
||||
fun SpaceChildInfo.toMatrixItem() = MatrixItem.RoomItem(childRoomId, name ?: canonicalAlias ?: aliases?.firstOrNull(), avatarUrl)
|
||||
|
|
|
@ -90,7 +90,9 @@ internal class RoomSummaryMapper @Inject constructor(private val timelineEventMa
|
|||
autoJoin = it.autoJoin ?: false,
|
||||
viaServers = it.viaServers.toList(),
|
||||
parentRoomId = roomSummaryEntity.roomId,
|
||||
suggested = it.suggested
|
||||
suggested = it.suggested,
|
||||
canonicalAlias = it.childSummaryEntity?.canonicalAlias,
|
||||
aliases = it.childSummaryEntity?.aliases?.toList()
|
||||
)
|
||||
},
|
||||
flattenParentIds = roomSummaryEntity.flattenParentIds?.split("|") ?: emptyList()
|
||||
|
|
|
@ -146,7 +146,9 @@ internal class DefaultSpaceService @Inject constructor(
|
|||
viaServers = childStateEvContent.via.orEmpty(),
|
||||
activeMemberCount = childSummary.numJoinedMembers,
|
||||
parentRoomId = childStateEv.roomId,
|
||||
suggested = childStateEvContent.suggested
|
||||
suggested = childStateEvContent.suggested,
|
||||
canonicalAlias = childSummary.canonicalAlias,
|
||||
aliases = childSummary.aliases
|
||||
)
|
||||
}
|
||||
}.orEmpty()
|
||||
|
|
|
@ -35,7 +35,7 @@ import org.matrix.android.sdk.api.failure.Failure
|
|||
import org.matrix.android.sdk.api.failure.MatrixError.Companion.M_UNRECOGNIZED
|
||||
import org.matrix.android.sdk.api.session.room.model.RoomType
|
||||
import org.matrix.android.sdk.api.session.room.model.SpaceChildInfo
|
||||
import org.matrix.android.sdk.api.util.MatrixItem
|
||||
import org.matrix.android.sdk.api.util.toMatrixItem
|
||||
import javax.inject.Inject
|
||||
|
||||
class SpaceDirectoryController @Inject constructor(
|
||||
|
|
Loading…
Reference in New Issue