Add distinctUntilChanged to speaker hint flow to prevent repeated popups.

Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
Alex HartandGreyson Parrelli authored and Cody Henthorne committed 2026-02-24 16:50:01 -05:00
1 parent 3f190efb4e
commit 01b56995d9
1 file changed
+1 -1
@@ -84,7 +84,7 @@ class WebRtcCallViewModel : ViewModel() {
private val groupMemberStateUpdater = FlowCollector<List<GroupMemberEntry.FullMember>> { m -> participantsState.update { CallParticipantsState.update(it, m) } }
private val shouldShowSpeakerHint: Flow<Boolean> = participantsState.map(this::shouldShowSpeakerHint)
private val shouldShowSpeakerHint: Flow<Boolean> = participantsState.map(this::shouldShowSpeakerHint).distinctUntilChanged()
private val elapsedTimeHandler = Handler(Looper.getMainLooper())
private val elapsedTimeRunnable = Runnable { handleTick() }