Introduce AvatarType to be able to render space avatars
This commit is contained in:
parent
ae96bc632f
commit
3669128e60
22 changed files with 337 additions and 78 deletions
|
|
@ -53,6 +53,7 @@ import io.element.android.libraries.designsystem.components.BigIcon
|
|||
import io.element.android.libraries.designsystem.components.async.AsyncActionView
|
||||
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
||||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||
import io.element.android.libraries.designsystem.components.avatar.AvatarType
|
||||
import io.element.android.libraries.designsystem.components.button.BackButton
|
||||
import io.element.android.libraries.designsystem.components.button.SuperButton
|
||||
import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog
|
||||
|
|
@ -92,7 +93,11 @@ fun JoinRoomView(
|
|||
vertical = 32.dp
|
||||
),
|
||||
topBar = {
|
||||
JoinRoomTopBar(contentState = state.contentState, onBackClick = onBackClick)
|
||||
JoinRoomTopBar(
|
||||
contentState = state.contentState,
|
||||
hideAvatarImage = state.hideAvatarsImages,
|
||||
onBackClick = onBackClick,
|
||||
)
|
||||
},
|
||||
content = {
|
||||
JoinRoomContent(
|
||||
|
|
@ -490,7 +495,11 @@ private fun DefaultLoadedContent(
|
|||
RoomPreviewOrganism(
|
||||
modifier = modifier,
|
||||
avatar = {
|
||||
Avatar(contentState.avatarData(AvatarSize.RoomHeader), hideImage = hideAvatarImage)
|
||||
Avatar(
|
||||
contentState.avatarData(AvatarSize.RoomHeader),
|
||||
hideImage = hideAvatarImage,
|
||||
avatarType = AvatarType.Room(),
|
||||
)
|
||||
},
|
||||
title = {
|
||||
if (contentState.name != null) {
|
||||
|
|
@ -545,6 +554,7 @@ private fun DefaultLoadedContent(
|
|||
@Composable
|
||||
private fun JoinRoomTopBar(
|
||||
contentState: ContentState,
|
||||
hideAvatarImage: Boolean,
|
||||
onBackClick: () -> Unit,
|
||||
) {
|
||||
TopAppBar(
|
||||
|
|
@ -561,7 +571,11 @@ private fun JoinRoomTopBar(
|
|||
modifier = titleModifier,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Avatar(avatarData = contentState.avatarData(AvatarSize.TimelineRoom))
|
||||
Avatar(
|
||||
avatarData = contentState.avatarData(AvatarSize.TimelineRoom),
|
||||
hideImage = hideAvatarImage,
|
||||
avatarType = AvatarType.Room(),
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier.padding(horizontal = 8.dp),
|
||||
text = contentState.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue