mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Merge pull request #3372 from vector-im/feature/bca/fix_3371
Fix | Explore room list: the RoomId is displayed instead of name (#3371)
This commit is contained in:
commit
7b15403260
6 changed files with 13 additions and 6 deletions
|
@ -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)
|
||||
- Spaces | Personal spaces add DM - Web Parity (#3271)
|
||||
- Spaces | Improve 'Leave Space' UX/UI (#3359)
|
||||
- Don't create private spaces with encryption enabled (#3363)
|
||||
|
|
|
@ -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 ?: "", 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()
|
||||
|
|
|
@ -145,7 +145,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()
|
||||
|
|
|
@ -36,7 +36,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(
|
||||
|
@ -124,7 +124,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)
|
||||
|
|
Loading…
Reference in a new issue