Update avatar size on search results

This commit is contained in:
Florian Renaud 2023-03-13 11:15:38 +01:00
parent f93bdc189b
commit e8404ad62a
2 changed files with 11 additions and 7 deletions

View file

@ -222,7 +222,7 @@ fun CreateRoomSearchResultItem(
MatrixUserRow(
modifier = modifier.heightIn(min = 56.dp),
matrixUser = matrixUser,
avatarSize = AvatarSize.SMALL,
avatarSize = AvatarSize.Custom(36),
onClick = onClick,
)
}

View file

@ -18,11 +18,15 @@ package io.element.android.libraries.designsystem.components.avatar
import androidx.compose.ui.unit.dp
enum class AvatarSize(val value: Int) {
SMALL(32),
MEDIUM(40),
BIG(48),
HUGE(96);
sealed class AvatarSize(open val value: Int) {
val dp = value.dp
val dp get() = value.dp
object SMALL : AvatarSize(32)
object MEDIUM : AvatarSize(40)
object BIG : AvatarSize(48)
object HUGE : AvatarSize(96)
// FIXME maybe remove this field and switch back to an enum (or remove this class) when design system will be integrated
data class Custom(override val value: Int) : AvatarSize(value)
}