Move isTombstoned to AvatarType.Space
This commit is contained in:
parent
e202fbfbd9
commit
59aec12906
2 changed files with 6 additions and 4 deletions
|
|
@ -23,5 +23,6 @@ sealed interface AvatarType {
|
|||
|
||||
data class Space(
|
||||
val cornerSize: Dp,
|
||||
val isTombstoned: Boolean = false,
|
||||
) : AvatarType
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,11 @@ fun SpaceAvatar(
|
|||
avatarData: AvatarData,
|
||||
avatarType: AvatarType.Space,
|
||||
modifier: Modifier = Modifier,
|
||||
isTombstoned: Boolean = false,
|
||||
hideAvatarImage: Boolean = false,
|
||||
contentDescription: String? = null,
|
||||
) {
|
||||
when {
|
||||
isTombstoned -> TombstonedRoomAvatar(
|
||||
avatarType.isTombstoned -> TombstonedRoomAvatar(
|
||||
size = avatarData.size,
|
||||
avatarType = avatarType,
|
||||
modifier = modifier,
|
||||
|
|
@ -67,8 +66,10 @@ internal fun SpaceAvatarPreview() =
|
|||
)
|
||||
SpaceAvatar(
|
||||
avatarData = anAvatarData(),
|
||||
avatarType = AvatarType.Space(cornerSize = 16.dp),
|
||||
isTombstoned = true,
|
||||
avatarType = AvatarType.Space(
|
||||
cornerSize = 16.dp,
|
||||
isTombstoned = true,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue