Remove default param for AvatarCluster.avatarType
This commit is contained in:
parent
f3a885e535
commit
b532f6e60b
2 changed files with 4 additions and 1 deletions
|
|
@ -33,8 +33,8 @@ private const val MAX_AVATAR_COUNT = 4
|
||||||
@Composable
|
@Composable
|
||||||
internal fun AvatarCluster(
|
internal fun AvatarCluster(
|
||||||
avatars: ImmutableList<AvatarData>,
|
avatars: ImmutableList<AvatarData>,
|
||||||
|
avatarType: AvatarType,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
avatarType: AvatarType = AvatarType.User,
|
|
||||||
hideAvatarImages: Boolean = false,
|
hideAvatarImages: Boolean = false,
|
||||||
contentDescription: String? = null,
|
contentDescription: String? = null,
|
||||||
) {
|
) {
|
||||||
|
|
@ -119,6 +119,7 @@ internal fun AvatarClusterPreview() = ElementThemedPreview {
|
||||||
for (ngOfAvatars in 1..5) {
|
for (ngOfAvatars in 1..5) {
|
||||||
AvatarCluster(
|
AvatarCluster(
|
||||||
avatars = List(ngOfAvatars) { anAvatarData(it) }.toPersistentList(),
|
avatars = List(ngOfAvatars) { anAvatarData(it) }.toPersistentList(),
|
||||||
|
avatarType = AvatarType.User,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ internal fun RoomAvatar(
|
||||||
else -> {
|
else -> {
|
||||||
AvatarCluster(
|
AvatarCluster(
|
||||||
avatars = avatarType.heroes,
|
avatars = avatarType.heroes,
|
||||||
|
// Note: even for a room avatar, we use UserAvatarType here to display the avatar of heroes
|
||||||
|
avatarType = AvatarType.User,
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
hideAvatarImages = hideAvatarImage,
|
hideAvatarImages = hideAvatarImage,
|
||||||
contentDescription = contentDescription
|
contentDescription = contentDescription
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue