From 17bcf8c55c4c650e4f6d9f192041a3db2f03ab50 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 8 Jul 2026 17:58:06 +0200 Subject: [PATCH] Reflect new design updates --- .../components/ActiveCallTimelineItemView.kt | 31 +++++++------------ .../src/main/res/values/localazy.xml | 8 ++--- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ActiveCallTimelineItemView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ActiveCallTimelineItemView.kt index 8a5fc925d2..e034f4ad4d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ActiveCallTimelineItemView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ActiveCallTimelineItemView.kt @@ -251,18 +251,7 @@ private fun GroupCallBody(event: TimelineItem.Event, state: RtcNotificationState ) } } else { - val membersToShowCount = 4 - // Keep the one with avatar first but maintain - // the first user as it might be the call creator - val sortedMembers = remember(state.joinedMembers) { - if (state.joinedMembers.isEmpty()) return@remember emptyList() - val first = state.joinedMembers.first() - val rest = state.joinedMembers.drop(1).sortedByDescending { it.avatarUrl != null } - listOf(first) + rest - } - val displayMembers = sortedMembers.take(membersToShowCount) - val extraCount = state.joinedMembers.size - membersToShowCount - + val displayMembers = state.joinedMembers.take(3) AvatarRow( avatarDataList = displayMembers .map { user -> @@ -277,13 +266,15 @@ private fun GroupCallBody(event: TimelineItem.Event, state: RtcNotificationState overlapRatio = 0.5f, lastOnTop = true, ) - if (extraCount > 0) { - Text( - text = pluralStringResource(CommonPlurals.screen_timeline_active_call_extra_joined_count, count = state.joinedMembers.size, extraCount), - style = ElementTheme.typography.fontBodySmRegular, - color = ElementTheme.colors.textSecondary, - ) - } + Text( + text = pluralStringResource( + CommonPlurals.screen_timeline_active_call_joined_count, + count = state.joinedMembers.size, + state.joinedMembers.size + ), + style = ElementTheme.typography.fontBodySmRegular, + color = ElementTheme.colors.textSecondary, + ) } } } @@ -327,7 +318,7 @@ internal fun ActiveCallTimelineItemViewPreview() = ElementPreview( aMatrixUser(displayName = USER_NAME_CHARLIE), aMatrixUser(displayName = USER_NAME_JOHN_DOE, avatarUrl = "anUrlC"), ), - isJoined = true, + isJoined = false, callStartTsMillis = System.currentTimeMillis(), callIntent = callIntent ) to false, diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 27e6cd40eb..daf7753e4f 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -479,6 +479,10 @@ Are you sure you want to continue?" "Location sharing in progress" "%1$s Live Location" "%1$s Android" + + "%1$d joined" + "%1$d joined" + "Rageshake to report bug" "Screenshot" "%1$s: %2$s" @@ -537,10 +541,6 @@ Are you sure you want to continue?" "Spaces" "Shared %1$s" "On the map" - - "+ %1$d joined" - "+ %1$d joined" - "Message not sent because %1$s’s verified digital identity was reset." "Message not sent because %1$s has not verified all devices." "Message not sent because you have not verified one or more of your devices."