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
commit dbc0c42e31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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,

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:065466dc414d77a58f2d22c26fc9d5e9b7afe5d5206cdbcc2bbdc6e8ea192d15
size 40479
oid sha256:c74cd385b81f7f101159b0ab3adb0c3493a8ce98b4b8cd944a166e9d0a30f8a2
size 39803

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3c34b8c47d89231b8e5660726d63b94e3e8b97a2fc7e0b615f8f9e2d61066470
size 39172
oid sha256:b59fcb83f0d291b658efc88ce311a108655af03ca8382339c2a0d0c3a5bcdf43
size 38201

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:617a819de3cd223323b0fa1853185ceb26ffb97a22d79524acec0f4d5b3a634b
size 33550
oid sha256:757f2a92a384f2084a1a1ea475e2a6743a55ce5ad7758bdf1597435ca29151e1
size 32879

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e146eee5e94e29a2b87b3d4a9bf248445e08dc6eb68c2268b6f263533675c78
size 33050
oid sha256:6f56bfe0e59c767102a8e079c31e90cbc10c00a31b35614cbb188e1d5008b041
size 32114

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bc5c6fd076abe852ab8a44a204988adb2e506a6610d5b2e32199176f2783ecd
size 44120
oid sha256:75ac80012ecc16c11b4e6267d7570e141060b01991aee50a6bb26316f328703e
size 42304

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8c9c5c46539bbce9874a03cbdb58288fd925bbc381a2030ca18d1eabb7667da2
size 44744
oid sha256:d60c7c0e5a7926142ecd2da8166708174240045a5814545114ab8e3fea5aa871
size 43317