Add active call icon to room list summaries (#1792)

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
Jorge Martin Espinosa 2023-11-13 16:35:11 +01:00 committed by GitHub
parent 00a750a31a
commit d29052eb47
33 changed files with 71 additions and 51 deletions

1
changelog.d/1158.feature Normal file
View file

@ -0,0 +1 @@
Add ongoing call indicator to rooms lists items.

View file

@ -172,14 +172,22 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) {
// Unread // Unread
Row( Row(
modifier = Modifier.height(16.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp), horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically, 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) NotificationIcon(room)
if (room.hasUnread) { if (room.hasUnread) {
UnreadIndicatorAtom( UnreadIndicatorAtom()
modifier = Modifier.padding(vertical = 3.dp),
)
} }
} }
} }

View file

@ -161,6 +161,7 @@ class RoomListDataSource @Inject constructor(
}.orEmpty(), }.orEmpty(),
avatarData = avatarData, avatarData = avatarData,
notificationMode = roomSummary.details.notificationMode, notificationMode = roomSummary.details.notificationMode,
hasOngoingCall = roomSummary.details.hasOngoingCall,
) )
} }
null -> null null -> null

View file

@ -33,4 +33,5 @@ data class RoomListRoomSummary constructor(
val avatarData: AvatarData = AvatarData(id, name, size = AvatarSize.RoomListItem), val avatarData: AvatarData = AvatarData(id, name, size = AvatarSize.RoomListItem),
val isPlaceholder: Boolean = false, val isPlaceholder: Boolean = false,
val notificationMode: RoomNotificationMode? = null, val notificationMode: RoomNotificationMode? = null,
val hasOngoingCall: Boolean = false,
) )

View file

@ -40,6 +40,7 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider<RoomListRoomSu
timestamp = "yesterday", timestamp = "yesterday",
hasUnread = true, hasUnread = true,
), ),
aRoomListRoomSummary().copy(hasUnread = true, hasOngoingCall = true),
) )
} }

View file

@ -44,4 +44,5 @@ data class RoomSummaryDetails(
val unreadNotificationCount: Int, val unreadNotificationCount: Int,
val inviter: RoomMember? = null, val inviter: RoomMember? = null,
val notificationMode: RoomNotificationMode? = null, val notificationMode: RoomNotificationMode? = null,
val hasOngoingCall: Boolean = false,
) )

View file

@ -41,6 +41,7 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto
lastMessageTimestamp = latestRoomMessage?.originServerTs, lastMessageTimestamp = latestRoomMessage?.originServerTs,
inviter = roomInfo.inviter?.let(RoomMemberMapper::map), inviter = roomInfo.inviter?.let(RoomMemberMapper::map),
notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode), notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),
hasOngoingCall = roomInfo.hasRoomCall,
) )
} }
} }

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b8f07e6b40dc7b9416bfe5d5c54643e0d7db9bd833c0bf9356ad423b788a16a7 oid sha256:c43973e2ea3e2f58eb8c4ae375ed503493bc4d1f739a69fcb6bd0db150b1852d
size 12610 size 12658

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:39b7b8354b98bca791698ad65f4e21619136f446b2fd050c302bdd27ce138a4a oid sha256:f0f00ce6af3af7f2df1ee1ef9f953efb78347368824ae0b7daef2edbb154ef00
size 13263 size 13281

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:64e7ca21b0213413ed45d0640295ceb2764b01b2bce20a01518e55e620925086 oid sha256:ce2efae39dce136aa480a52ece41871dbdff32cc9358cf973698db25720a8ef1
size 22193 size 22205

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c554064b9bc895d5f9bb76c25166bdbe5b217b40ab5ece5d4b79c9d0144226e3
size 12154

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:7ec6af35e17f96fbbb0ea56f2b290c0056be5c4b88ef6ae04201052ee665d46f oid sha256:fa160a5d77537b771e0f806821f0c0644c79235f3059ac57fed8ee04080a5098
size 12441 size 12503

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b293b63f5d1945b8a9b8b5c40afb077757e4f4662eb40a9f4245a21b7a05fe3c oid sha256:33f1607f57f91bf4fb8a10c908af98778a1918e35afbcc94ca047e5a0fafa138
size 12971 size 12972

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:8bafbb6d5893abaefc96abba3cf1115a44e8cfa8af03de343ea11250c17b9445 oid sha256:ec44c36dea5b03ed4b088d2fcf69a99c7062876c543fa9799c29e94019a3c839
size 21319 size 21327

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6975fc9b40a77082d4797a1493047163759fcfac6d6c59b389a57c5a06dcb5e9
size 12055

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:e649c7fc1608661f8910e86200016a5e2dfe3395cf140c3819dcc7c42d28a2a6 oid sha256:122b0b090fcb1bba3669daa6e56077305ea542d15ae784addf57f30924d9be8d
size 29940 size 29956

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:86bc6476c9cdc9187e3e4411c693124e1b6e2ac28dc85014c05925741d322be0 oid sha256:69bfa6cbde376e66c4f2f93daac0e51b80dc60c5df557230c8396b74ef8235ed
size 29790 size 29792

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0e1be8a38303b5d443f8e0911c34497400b1b577b711191c52ad00b67229a7d1 oid sha256:68318c9078a0b3406c9a1b2608bac62e237aa484d1115744c209578520c679c0
size 65314 size 65331

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c02883f4a671a5c27da1fd5f3f635d7e23ed077aec2d47dc2ac6e0e2ced72f59 oid sha256:da1217533e35ecb2f5711d391810b121c08605ea80610257e4920486654b8e4b
size 86748 size 86763

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0e1be8a38303b5d443f8e0911c34497400b1b577b711191c52ad00b67229a7d1 oid sha256:68318c9078a0b3406c9a1b2608bac62e237aa484d1115744c209578520c679c0
size 65314 size 65331

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:3057d4d0d83a51dda75f7701698ed8be2f2a99d01e5e43ab639f59210cc3a9a5 oid sha256:248ea17753be1b4c4024ea864187229b8004852c998567eee47bac86b7cca885
size 65326 size 65308

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:952766c0bbe97ba343ebc68966c0148da68bb4dd8c802dd98f937ca8974a314e oid sha256:98ccf3edf3af713d99f11c785c9fa2a3aeebd59a7a653e3b742231a31640ea3d
size 66408 size 66380

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:44b50286480b8351ace34656d7396e2dab9694fc5a19fd9226d5008b87b2bb30 oid sha256:df66de28614a59895dd0af5cfa35615f67bcae5626c2c8bf6a1d36cf7246d3a2
size 66794 size 66770

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:e649c7fc1608661f8910e86200016a5e2dfe3395cf140c3819dcc7c42d28a2a6 oid sha256:122b0b090fcb1bba3669daa6e56077305ea542d15ae784addf57f30924d9be8d
size 29940 size 29956

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:a10e3677e9550a0579bcbda29c31303229638a838ced006c678697507340c514 oid sha256:c5df4007cd48966eee91becdca376c1da4951b1a33250fedc7978eca074bdd65
size 89949 size 89958

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c1e7bd8361314f95f67930a3795066d0028fd64dbafb79c2d699596d95f6db95 oid sha256:7ae852acf3b6b2c93a7bc06d0cff90bb0db127860ffe3627cccddcaebec7547a
size 67522 size 67524

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:2ad2f44c3fb1915ad6e226a973cecc3662c02bdf4dd8faf1eb3f056346fa1aca oid sha256:160f264d9b81551862685a9775c5ba64d95b2f9878bd63fef9d3514a861fd66b
size 88667 size 88670

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c1e7bd8361314f95f67930a3795066d0028fd64dbafb79c2d699596d95f6db95 oid sha256:7ae852acf3b6b2c93a7bc06d0cff90bb0db127860ffe3627cccddcaebec7547a
size 67522 size 67524

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:f630b7f9eae799cfea12bebb5df52c60e8a5a3007d0a7d6febd90c945bd67566 oid sha256:04b542c31ec5426233733a95fa1c979942f38e96fde8b493eb6cbc0acad748a3
size 67292 size 67299

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:0c1fc5a06c2399f36ea14f1135be2a98a836485c980f08523dca2b79edbcee78 oid sha256:9038678df851eabcffad0d471174a1f1ebb5762378277f60c0447a02b0dc2aed
size 69111 size 69113

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b83df3739ab45b9b96461dd56e69befdb7119e3bc68fa141bd6b4086e384a02c oid sha256:206a10817585b36643d53a89d2f8316f182276a3145955b9d90f456e8a999c5a
size 69466 size 69474

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:86bc6476c9cdc9187e3e4411c693124e1b6e2ac28dc85014c05925741d322be0 oid sha256:69bfa6cbde376e66c4f2f93daac0e51b80dc60c5df557230c8396b74ef8235ed
size 29790 size 29792

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:7d7e2aed5d5ec7f81334ba81b621ea489f4a59d40024f8560ed4084725c348fc oid sha256:1c7f451e0284eecf1c37390b76749a7c37f753235b2285092d3995ae755a2042
size 91560 size 91566