From cd4b1b721608f09fe39efa74230139e83c632e18 Mon Sep 17 00:00:00 2001 From: enki Date: Sat, 25 Jul 2026 23:54:24 -0700 Subject: [PATCH] Room list: always show who's in an active call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The participants row was gated on the voice-room classification, which only happens after the room's space was opened once — so live calls showed nobody. Now any room with active call participants lists them, with initial-letter avatars instead of plain dots. Co-Authored-By: Claude Fable 5 --- .../impl/components/BlapRoomListSections.kt | 19 ++++++++++++++----- .../impl/components/RoomListContentView.kt | 4 +++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/BlapRoomListSections.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/BlapRoomListSections.kt index 08f97c5ba7..fc9408343a 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/BlapRoomListSections.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/BlapRoomListSections.kt @@ -25,6 +25,10 @@ import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.home.impl.roomlist.BlapSection +import io.element.android.libraries.designsystem.components.avatar.Avatar +import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.libraries.designsystem.components.avatar.AvatarSize +import io.element.android.libraries.designsystem.components.avatar.AvatarType import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.api.core.UserId @@ -78,18 +82,23 @@ internal fun BlapVoiceMembersRow( ) { Column(modifier = modifier.padding(start = 64.dp, bottom = 8.dp)) { participants.take(MAX_VOICE_MEMBERS_SHOWN).forEach { userId -> + val localpart = userId.value.removePrefix("@").substringBefore(":") Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(vertical = 2.dp), ) { - androidx.compose.foundation.layout.Box( - modifier = Modifier - .size(8.dp) - .background(ElementTheme.colors.iconAccentPrimary, CircleShape), + Avatar( + avatarData = AvatarData( + id = userId.value, + name = localpart, + url = null, + size = AvatarSize.TimelineReadReceipt, + ), + avatarType = AvatarType.User, ) Spacer(modifier = Modifier.width(8.dp)) Text( - text = userId.value.removePrefix("@").substringBefore(":"), + text = localpart, style = ElementTheme.typography.fontBodySmRegular, color = ElementTheme.colors.textSecondary, ) diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt index d1d75bef96..69edfd1113 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/components/RoomListContentView.kt @@ -315,7 +315,9 @@ private fun RoomsViewList( onClick = onRoomClick, eventSink = eventSink, ) - if (room.roomId in state.blapVoiceRoomIds && room.activeRoomCallParticipants.isNotEmpty()) { + // Any room with an active call shows who's in it — not just classified + // voice rooms (classification lags until the space was opened once). + if (room.activeRoomCallParticipants.isNotEmpty()) { BlapVoiceMembersRow(participants = room.activeRoomCallParticipants) } if (index != entry.rooms.lastIndex) {