Merge pull request #5492 from element-hq/feature/bma/spaceAvatarCluster

Disable avatar cluster for now
This commit is contained in:
ganfra
2025-10-08 20:32:27 +02:00
committed by GitHub
8 changed files with 30 additions and 28 deletions

View File

@@ -13,6 +13,7 @@ import androidx.compose.ui.unit.Dp
import io.element.android.libraries.designsystem.components.avatar.AvatarData
import io.element.android.libraries.designsystem.components.avatar.AvatarType
import io.element.android.libraries.designsystem.components.avatar.avatarShape
import kotlinx.collections.immutable.toImmutableList
@Composable
internal fun RoomAvatar(
@@ -44,8 +45,9 @@ internal fun RoomAvatar(
}
else -> {
AvatarCluster(
avatars = avatarType.heroes,
// Note: even for a room avatar, we use UserAvatarType here to display the avatar of heroes
// Keep only the first hero for now
avatars = avatarType.heroes.take(1).toImmutableList(),
// Note: even for a room avatar, we use AvatarType.User here to display the avatar of heroes
avatarType = AvatarType.User,
modifier = modifier,
hideAvatarImages = hideAvatarImage,

View File

@@ -120,8 +120,8 @@ private fun SubtitleRow(
if (visibilityIcon != null) {
Icon(
modifier = Modifier
.size(16.dp)
.padding(end = 4.dp),
.size(16.dp)
.padding(end = 4.dp),
imageVector = visibilityIcon,
contentDescription = null,
tint = ElementTheme.colors.iconTertiary,
@@ -178,20 +178,20 @@ private fun SpaceRoomItemScaffold(
content: @Composable ColumnScope.() -> Unit,
) {
val clickModifier = Modifier
.combinedClickable(
onClick = onClick,
onLongClick = onLongClick,
onLongClickLabel = stringResource(CommonStrings.action_open_context_menu),
indication = ripple(),
interactionSource = remember { MutableInteractionSource() }
)
.onKeyboardContextMenuAction { onLongClick }
.combinedClickable(
onClick = onClick,
onLongClick = onLongClick,
onLongClickLabel = stringResource(CommonStrings.action_open_context_menu),
indication = ripple(),
interactionSource = remember { MutableInteractionSource() }
)
.onKeyboardContextMenuAction { onLongClick }
Row(
modifier = modifier
.fillMaxWidth()
.then(clickModifier)
.padding(horizontal = 16.dp, vertical = 8.dp)
.height(IntrinsicSize.Min),
.fillMaxWidth()
.then(clickModifier)
.padding(horizontal = 16.dp, vertical = 8.dp)
.height(IntrinsicSize.Min),
) {
Avatar(
avatarData = avatarData,