Add distinctUntilChanged to speaker hint flow to prevent repeated popups.

Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
Alex Hart
2026-02-24 12:46:12 -04:00
committed by Cody Henthorne
parent 3f190efb4e
commit 01b56995d9

View File

@@ -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() }