mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Remove default param for AvatarCluster.avatarType
This commit is contained in:
+2
-1
@@ -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,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user