mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +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 }
|
||||
) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.thoughtcrime.securesms.components.webrtc.BroadcastVideoSink
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.ringrtc.CameraState
|
||||
|
||||
data class CallParticipant constructor(
|
||||
data class CallParticipant(
|
||||
val callParticipantId: CallParticipantId = CallParticipantId(Recipient.UNKNOWN),
|
||||
val recipient: Recipient = Recipient.UNKNOWN,
|
||||
val identityKey: IdentityKey? = null,
|
||||
|
||||
Reference in New Issue
Block a user