mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Reflect new design updates
This commit is contained in:
+7
-16
@@ -251,18 +251,7 @@ private fun GroupCallBody(event: TimelineItem.Event, state: RtcNotificationState
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val membersToShowCount = 4
|
val displayMembers = state.joinedMembers.take(3)
|
||||||
// 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
|
|
||||||
|
|
||||||
AvatarRow(
|
AvatarRow(
|
||||||
avatarDataList = displayMembers
|
avatarDataList = displayMembers
|
||||||
.map { user ->
|
.map { user ->
|
||||||
@@ -277,9 +266,12 @@ private fun GroupCallBody(event: TimelineItem.Event, state: RtcNotificationState
|
|||||||
overlapRatio = 0.5f,
|
overlapRatio = 0.5f,
|
||||||
lastOnTop = true,
|
lastOnTop = true,
|
||||||
)
|
)
|
||||||
if (extraCount > 0) {
|
|
||||||
Text(
|
Text(
|
||||||
text = pluralStringResource(CommonPlurals.screen_timeline_active_call_extra_joined_count, count = state.joinedMembers.size, extraCount),
|
text = pluralStringResource(
|
||||||
|
CommonPlurals.screen_timeline_active_call_joined_count,
|
||||||
|
count = state.joinedMembers.size,
|
||||||
|
state.joinedMembers.size
|
||||||
|
),
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
color = ElementTheme.colors.textSecondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
@@ -287,7 +279,6 @@ private fun GroupCallBody(event: TimelineItem.Event, state: RtcNotificationState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@PreviewsDayNight
|
@PreviewsDayNight
|
||||||
@PreviewWithLargeHeight
|
@PreviewWithLargeHeight
|
||||||
@@ -327,7 +318,7 @@ internal fun ActiveCallTimelineItemViewPreview() = ElementPreview(
|
|||||||
aMatrixUser(displayName = USER_NAME_CHARLIE),
|
aMatrixUser(displayName = USER_NAME_CHARLIE),
|
||||||
aMatrixUser(displayName = USER_NAME_JOHN_DOE, avatarUrl = "anUrlC"),
|
aMatrixUser(displayName = USER_NAME_JOHN_DOE, avatarUrl = "anUrlC"),
|
||||||
),
|
),
|
||||||
isJoined = true,
|
isJoined = false,
|
||||||
callStartTsMillis = System.currentTimeMillis(),
|
callStartTsMillis = System.currentTimeMillis(),
|
||||||
callIntent = callIntent
|
callIntent = callIntent
|
||||||
) to false,
|
) to false,
|
||||||
|
|||||||
@@ -479,6 +479,10 @@ Are you sure you want to continue?"</string>
|
|||||||
<string name="live_location_sharing_foreground_service_message_android">"Location sharing in progress"</string>
|
<string name="live_location_sharing_foreground_service_message_android">"Location sharing in progress"</string>
|
||||||
<string name="live_location_sharing_foreground_service_title_android">"%1$s Live Location"</string>
|
<string name="live_location_sharing_foreground_service_title_android">"%1$s Live Location"</string>
|
||||||
<string name="login_initial_device_name_android">"%1$s Android"</string>
|
<string name="login_initial_device_name_android">"%1$s Android"</string>
|
||||||
|
<plurals name="screen_timeline_active_call_joined_count">
|
||||||
|
<item quantity="one">"%1$d joined"</item>
|
||||||
|
<item quantity="other">"%1$d joined"</item>
|
||||||
|
</plurals>
|
||||||
<string name="preference_rageshake">"Rageshake to report bug"</string>
|
<string name="preference_rageshake">"Rageshake to report bug"</string>
|
||||||
<string name="screen_bug_report_a11y_screenshot">"Screenshot"</string>
|
<string name="screen_bug_report_a11y_screenshot">"Screenshot"</string>
|
||||||
<string name="screen_create_poll_option_accessibility_label">"%1$s: %2$s"</string>
|
<string name="screen_create_poll_option_accessibility_label">"%1$s: %2$s"</string>
|
||||||
@@ -537,10 +541,6 @@ Are you sure you want to continue?"</string>
|
|||||||
<string name="screen_space_list_title">"Spaces"</string>
|
<string name="screen_space_list_title">"Spaces"</string>
|
||||||
<string name="screen_static_location_sheet_timestamp_description">"Shared %1$s"</string>
|
<string name="screen_static_location_sheet_timestamp_description">"Shared %1$s"</string>
|
||||||
<string name="screen_static_location_sheet_title">"On the map"</string>
|
<string name="screen_static_location_sheet_title">"On the map"</string>
|
||||||
<plurals name="screen_timeline_active_call_extra_joined_count">
|
|
||||||
<item quantity="one">"+ %1$d joined"</item>
|
|
||||||
<item quantity="other">"+ %1$d joined"</item>
|
|
||||||
</plurals>
|
|
||||||
<string name="screen_timeline_item_menu_send_failure_changed_identity">"Message not sent because %1$s’s verified digital identity was reset."</string>
|
<string name="screen_timeline_item_menu_send_failure_changed_identity">"Message not sent because %1$s’s verified digital identity was reset."</string>
|
||||||
<string name="screen_timeline_item_menu_send_failure_unsigned_device">"Message not sent because %1$s has not verified all devices."</string>
|
<string name="screen_timeline_item_menu_send_failure_unsigned_device">"Message not sent because %1$s has not verified all devices."</string>
|
||||||
<string name="screen_timeline_item_menu_send_failure_you_unsigned_device">"Message not sent because you have not verified one or more of your devices."</string>
|
<string name="screen_timeline_item_menu_send_failure_you_unsigned_device">"Message not sent because you have not verified one or more of your devices."</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user