mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Merge pull request #7973 from vector-im/yostyle/voicebroadcast_pause_playback
This commit is contained in:
commit
5b22a1267e
1
changelog.d/7830.misc
Normal file
1
changelog.d/7830.misc
Normal file
@ -0,0 +1 @@
|
||||
Pause voice broadcast listening on new VB recording
|
@ -626,13 +626,17 @@ class TimelineViewModel @AssistedInject constructor(
|
||||
viewModelScope.launch {
|
||||
when (action) {
|
||||
VoiceBroadcastAction.Recording.Start -> {
|
||||
voiceBroadcastHelper.pausePlayback()
|
||||
voiceBroadcastHelper.startVoiceBroadcast(room.roomId).fold(
|
||||
{ _viewEvents.post(RoomDetailViewEvents.ActionSuccess(action)) },
|
||||
{ _viewEvents.post(RoomDetailViewEvents.ActionFailure(action, it)) },
|
||||
)
|
||||
}
|
||||
VoiceBroadcastAction.Recording.Pause -> voiceBroadcastHelper.pauseVoiceBroadcast(room.roomId)
|
||||
VoiceBroadcastAction.Recording.Resume -> voiceBroadcastHelper.resumeVoiceBroadcast(room.roomId)
|
||||
VoiceBroadcastAction.Recording.Resume -> {
|
||||
voiceBroadcastHelper.pausePlayback()
|
||||
voiceBroadcastHelper.resumeVoiceBroadcast(room.roomId)
|
||||
}
|
||||
VoiceBroadcastAction.Recording.Stop -> _viewEvents.post(RoomDetailViewEvents.DisplayPromptToStopVoiceBroadcast)
|
||||
VoiceBroadcastAction.Recording.StopConfirmed -> voiceBroadcastHelper.stopVoiceBroadcast(room.roomId)
|
||||
is VoiceBroadcastAction.Listening.PlayOrResume -> voiceBroadcastHelper.playOrResumePlayback(action.voiceBroadcast)
|
||||
|
Loading…
Reference in New Issue
Block a user