Remove default param for AvatarCluster.avatarType

This commit is contained in:
Benoit Marty 2025-06-23 21:27:40 +02:00
parent b36f68b8c4
commit 63d8d9b09e
2 changed files with 4 additions and 1 deletions

View file

@ -33,8 +33,8 @@ private const val MAX_AVATAR_COUNT = 4
@Composable
internal fun AvatarCluster(
avatars: ImmutableList<AvatarData>,
avatarType: AvatarType,
modifier: Modifier = Modifier,
avatarType: AvatarType = AvatarType.User,
hideAvatarImages: Boolean = false,
contentDescription: String? = null,
) {
@ -119,6 +119,7 @@ internal fun AvatarClusterPreview() = ElementThemedPreview {
for (ngOfAvatars in 1..5) {
AvatarCluster(
avatars = List(ngOfAvatars) { anAvatarData(it) }.toPersistentList(),
avatarType = AvatarType.User,
)
}
}

View file

@ -49,6 +49,8 @@ internal fun RoomAvatar(
else -> {
AvatarCluster(
avatars = avatarType.heroes,
// Note: even for a room avatar, we use UserAvatarType here to display the avatar of heroes
avatarType = AvatarType.User,
modifier = modifier,
hideAvatarImages = hideAvatarImage,
contentDescription = contentDescription