Code review

This commit is contained in:
Valere 2021-05-21 11:42:01 +02:00
parent cb6f414c60
commit 8d3167cb66
2 changed files with 2 additions and 2 deletions

View file

@ -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 ?: canonicalAlias ?: aliases?.firstOrNull(), avatarUrl)
fun SpaceChildInfo.toMatrixItem() = MatrixItem.RoomItem(childRoomId, name ?: canonicalAlias ?: "", avatarUrl)

View file

@ -108,7 +108,7 @@ class SpaceDirectoryController @Inject constructor(
val isLoading = data?.changeMembershipStates?.get(info.childRoomId)?.isInProgress() ?: false
spaceChildInfoItem {
id(info.childRoomId)
matrixItem(MatrixItem.RoomItem(info.childRoomId, info.name, info.avatarUrl))
matrixItem(info.toMatrixItem())
avatarRenderer(host.avatarRenderer)
topic(info.topic)
memberCount(info.activeMemberCount ?: 0)