Browse Source

Rework: improve OnGoingCallIcon API.

pull/2293/head
Benoit Marty 8 months ago
parent
commit
429effc706
  1. 12
      features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt

12
features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt

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

Loading…
Cancel
Save