Rework: improve OnGoingCallIcon API.

This commit is contained in:
Benoit Marty 2024-01-25 15:29:11 +01:00
parent 4035c1ca5b
commit 01ba6aa917

View file

@ -173,9 +173,9 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) {
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
) { ) {
// Video call // Video call
OnGoingCallIcon( if (room.hasRoomCall) {
room.hasRoomCall, OnGoingCallIcon()
) }
// Other indicators // Other indicators
NotificationIcons( NotificationIcons(
room.userDefinedNotificationMode, room.userDefinedNotificationMode,
@ -186,10 +186,7 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) {
} }
@Composable @Composable
private fun OnGoingCallIcon( private fun OnGoingCallIcon() {
hasRoomCall: Boolean,
) {
if (hasRoomCall) {
Icon( Icon(
modifier = Modifier.size(16.dp), modifier = Modifier.size(16.dp),
imageVector = CompoundIcons.VideoCallSolid, imageVector = CompoundIcons.VideoCallSolid,
@ -197,7 +194,6 @@ private fun OnGoingCallIcon(
tint = ElementTheme.colors.unreadIndicator, tint = ElementTheme.colors.unreadIndicator,
) )
} }
}
@Composable @Composable
private fun RowScope.NotificationIcons( private fun RowScope.NotificationIcons(