From fdf858f3798537df2c7f597f77c11023a66df816 Mon Sep 17 00:00:00 2001 From: Nicholas Tinsley Date: Thu, 6 Jun 2024 16:22:16 -0400 Subject: [PATCH] Prevent crash if linked device also raises their hand. --- .../securesms/components/webrtc/CallParticipantsState.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantsState.kt b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantsState.kt index e73ae4a4e3..812e3adad3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantsState.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/webrtc/CallParticipantsState.kt @@ -60,6 +60,7 @@ data class CallParticipantsState( .sortedBy { it.timestamp } .toMutableList() if (localParticipant.isHandRaised) { + results.removeIf { it.sender.id == localParticipant.recipient.id } results.add(GroupCallRaiseHandEvent(localParticipant.recipient, localParticipant.handRaisedTimestamp)) } return results.toImmutableList()