Add active call icon to room list summaries (#1792)
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
00a750a31a
commit
d29052eb47
33 changed files with 71 additions and 51 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ class RoomListDataSource @Inject constructor(
|
|||
}.orEmpty(),
|
||||
avatarData = avatarData,
|
||||
notificationMode = roomSummary.details.notificationMode,
|
||||
hasOngoingCall = roomSummary.details.hasOngoingCall,
|
||||
)
|
||||
}
|
||||
null -> null
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider<RoomListRoomSu
|
|||
timestamp = "yesterday",
|
||||
hasUnread = true,
|
||||
),
|
||||
aRoomListRoomSummary().copy(hasUnread = true, hasOngoingCall = true),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue