Ensure roomId are not rendered in the UI.
Add preview to see the effect. Use RoomAvatar data fallback everywhere, to not use roomId (`!` char) for the avatar initial, but rather `#`.
This commit is contained in:
parent
3d29d8729a
commit
ce7bb11724
23 changed files with 107 additions and 69 deletions
|
|
@ -29,12 +29,13 @@ open class RoomSummaryDetailsProvider : PreviewParameterProvider<RoomSummaryDeta
|
|||
override val values: Sequence<RoomSummaryDetails>
|
||||
get() = sequenceOf(
|
||||
aRoomSummaryDetails(),
|
||||
aRoomSummaryDetails(name = null),
|
||||
)
|
||||
}
|
||||
|
||||
fun aRoomSummaryDetails(
|
||||
roomId: RoomId = RoomId("!room:domain"),
|
||||
name: String = "roomName",
|
||||
name: String? = "roomName",
|
||||
canonicalAlias: RoomAlias? = null,
|
||||
isDirect: Boolean = true,
|
||||
avatarUrl: String? = null,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ fun SelectedRoom(
|
|||
) {
|
||||
Avatar(AvatarData(roomSummary.roomId.value, roomSummary.name, roomSummary.avatarUrl, AvatarSize.SelectedRoom))
|
||||
Text(
|
||||
text = roomSummary.name,
|
||||
// If name is null, we do not have space to render "No room name", so just use `#` here.
|
||||
text = roomSummary.name ?: "#",
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
maxLines = 1,
|
||||
style = MaterialTheme.typography.bodyLarge,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue