VoiceBroadcastPlayer - Filter live broadcast state listening on the referenced eventId
This commit is contained in:
parent
6d6b4e5208
commit
94390697ae
|
@ -179,7 +179,11 @@ class VoiceBroadcastPlayer @Inject constructor(
|
||||||
room.flow()
|
room.flow()
|
||||||
.liveStateEvent(VoiceBroadcastConstants.STATE_ROOM_VOICE_BROADCAST_INFO, QueryStringValue.Equals(voiceBroadcastEvent.root.stateKey!!))
|
.liveStateEvent(VoiceBroadcastConstants.STATE_ROOM_VOICE_BROADCAST_INFO, QueryStringValue.Equals(voiceBroadcastEvent.root.stateKey!!))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.mapNotNull { it.asVoiceBroadcastEvent()?.content?.voiceBroadcastState }
|
.mapNotNull { event ->
|
||||||
|
event.asVoiceBroadcastEvent()
|
||||||
|
?.takeIf { it.reference?.eventId == eventId }
|
||||||
|
?.content?.voiceBroadcastState
|
||||||
|
}
|
||||||
.onEach { state ->
|
.onEach { state ->
|
||||||
when (state) {
|
when (state) {
|
||||||
VoiceBroadcastState.STARTED,
|
VoiceBroadcastState.STARTED,
|
||||||
|
|
Loading…
Reference in New Issue