mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Deduplicate call participants in call info screen..
This commit is contained in:
committed by
Greyson Parrelli
parent
8c9b668cd7
commit
3a314c565c
@@ -53,7 +53,12 @@ data class CallParticipantsState(
|
||||
|
||||
val raisedHands: List<GroupCallRaiseHandEvent>
|
||||
get() {
|
||||
val results = allRemoteParticipants.filter { it.isHandRaised }.map { GroupCallRaiseHandEvent(it.recipient, it.handRaisedTimestamp) }.toMutableList()
|
||||
val results = allRemoteParticipants.asSequence()
|
||||
.filter { it.isHandRaised }
|
||||
.distinctBy { it.recipient }
|
||||
.map { GroupCallRaiseHandEvent(it.recipient, it.handRaisedTimestamp) }
|
||||
.sortedBy { it.timestamp }
|
||||
.toMutableList()
|
||||
if (localParticipant.isHandRaised) {
|
||||
results.add(GroupCallRaiseHandEvent(localParticipant.recipient, localParticipant.handRaisedTimestamp))
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ private fun CallInfo(
|
||||
|
||||
if (!participantsState.inCallLobby || participantsState.isOngoing()) {
|
||||
items(
|
||||
items = participantsState.participantsForList,
|
||||
items = participantsState.participantsForList.distinctBy { it.callParticipantId },
|
||||
key = { it.callParticipantId },
|
||||
contentType = { null }
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user