mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 15:37:45 +02:00
Merge pull request #7257 from vector-im/nimau/PSF-1734_vb_control_center
Fix the now playing info center while a voice broadcast is played
This commit is contained in:
+8
-1
@@ -80,8 +80,15 @@ final class VoiceBroadcastPlaybackCoordinator: Coordinator, Presentable {
|
||||
}
|
||||
|
||||
func endVoiceBroadcast() {}
|
||||
|
||||
|
||||
func pausePlaying() {
|
||||
viewModel.context.send(viewAction: .pause)
|
||||
}
|
||||
|
||||
func pausePlayingInProgressVoiceBroadcast() {
|
||||
// Pause the playback if we are playing a live voice broadcast (or waiting for more chunks)
|
||||
if [.playing, .buffering].contains(viewModel.context.viewState.playbackState), viewModel.context.viewState.broadcastState != .stopped {
|
||||
viewModel.context.send(viewAction: .pause)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -78,6 +78,12 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
@objc public func pausePlayingInProgressVoiceBroadcast() {
|
||||
coordinatorsForEventIdentifiers.forEach { _, coordinator in
|
||||
coordinator.pausePlayingInProgressVoiceBroadcast()
|
||||
}
|
||||
}
|
||||
|
||||
private func handleEvent(event: MXEvent, direction: MXTimelineDirection, customObject: Any?) {
|
||||
if direction == .backwards {
|
||||
// ignore backwards events
|
||||
|
||||
Reference in New Issue
Block a user