diff --git a/changelog.d/1158.feature b/changelog.d/1158.feature new file mode 100644 index 0000000000..a3ce14a877 --- /dev/null +++ b/changelog.d/1158.feature @@ -0,0 +1 @@ +Add ongoing call indicator to rooms lists items. diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt index 2016cf5a6b..a437dd339c 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt @@ -172,14 +172,22 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) { // Unread Row( + modifier = Modifier.height(16.dp), horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically, ) { + // Video call + if (room.hasOngoingCall) { + Icon( + modifier = Modifier.size(16.dp), + resourceId = CommonDrawables.ic_compound_video_call, + contentDescription = null, + tint = ElementTheme.colors.unreadIndicator, + ) + } NotificationIcon(room) if (room.hasUnread) { - UnreadIndicatorAtom( - modifier = Modifier.padding(vertical = 3.dp), - ) + UnreadIndicatorAtom() } } } diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt index 6a9c152af6..b8af0a60cc 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt @@ -161,6 +161,7 @@ class RoomListDataSource @Inject constructor( }.orEmpty(), avatarData = avatarData, notificationMode = roomSummary.details.notificationMode, + hasOngoingCall = roomSummary.details.hasOngoingCall, ) } null -> null diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt index bb3405c2d3..3a445e6cdc 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt @@ -33,4 +33,5 @@ data class RoomListRoomSummary constructor( val avatarData: AvatarData = AvatarData(id, name, size = AvatarSize.RoomListItem), val isPlaceholder: Boolean = false, val notificationMode: RoomNotificationMode? = null, + val hasOngoingCall: Boolean = false, ) diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt index f2db8a376c..2649704427 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt @@ -40,6 +40,7 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider