mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Renamed back to VoiceBroadcastPlaybackCoordinator
The logic will be moved to the view model. This file will just serve the SwiftUI view
This commit is contained in:
+4
-4
@@ -18,18 +18,18 @@ import Combine
|
||||
import MatrixSDK
|
||||
import SwiftUI
|
||||
|
||||
struct VoiceBroadcastPlaybackControllerParameters {
|
||||
struct VoiceBroadcastPlaybackCoordinatorParameters {
|
||||
let session: MXSession
|
||||
let room: MXRoom
|
||||
let voiceBroadcastStartEvent: MXEvent
|
||||
}
|
||||
|
||||
final class VoiceBroadcastPlaybackController: Coordinator, Presentable, VoiceBroadcastAggregatorDelegate {
|
||||
final class VoiceBroadcastPlaybackCoordinator: Coordinator, Presentable, VoiceBroadcastAggregatorDelegate {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let parameters: VoiceBroadcastPlaybackControllerParameters
|
||||
private let parameters: VoiceBroadcastPlaybackCoordinatorParameters
|
||||
private let selectedAnswerIdentifiersSubject = PassthroughSubject<[String], Never>()
|
||||
|
||||
private var voiceBroadcastAggregator: VoiceBroadcastAggregator
|
||||
@@ -43,7 +43,7 @@ final class VoiceBroadcastPlaybackController: Coordinator, Presentable, VoiceBro
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(parameters: VoiceBroadcastPlaybackControllerParameters) throws {
|
||||
init(parameters: VoiceBroadcastPlaybackCoordinatorParameters) throws {
|
||||
self.parameters = parameters
|
||||
|
||||
try voiceBroadcastAggregator = VoiceBroadcastAggregator(session: parameters.session, room: parameters.room, voiceBroadcastStartEventId: parameters.voiceBroadcastStartEvent.eventId)
|
||||
+4
-4
@@ -20,7 +20,7 @@ class VoiceBroadcastPlaybackProvider {
|
||||
static let shared = VoiceBroadcastPlaybackProvider()
|
||||
|
||||
var session: MXSession?
|
||||
var coordinatorsForEventIdentifiers = [String: VoiceBroadcastPlaybackController]()
|
||||
var coordinatorsForEventIdentifiers = [String: VoiceBroadcastPlaybackCoordinator]()
|
||||
|
||||
private init() { }
|
||||
|
||||
@@ -35,8 +35,8 @@ class VoiceBroadcastPlaybackProvider {
|
||||
return coordinator.toPresentable().view
|
||||
}
|
||||
|
||||
let parameters = VoiceBroadcastPlaybackControllerParameters(session: session, room: room, voiceBroadcastStartEvent: event)
|
||||
guard let coordinator = try? VoiceBroadcastPlaybackController(parameters: parameters) else {
|
||||
let parameters = VoiceBroadcastPlaybackCoordinatorParameters(session: session, room: room, voiceBroadcastStartEvent: event)
|
||||
guard let coordinator = try? VoiceBroadcastPlaybackCoordinator(parameters: parameters) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class VoiceBroadcastPlaybackProvider {
|
||||
}
|
||||
|
||||
/// Retrieve the voiceBroadcast timeline coordinator for the given event or nil if it hasn't been created yet
|
||||
func voiceBroadcastPlaybackControllerForEventIdentifier(_ eventIdentifier: String) -> VoiceBroadcastPlaybackController? {
|
||||
func voiceBroadcastPlaybackCoordinatorForEventIdentifier(_ eventIdentifier: String) -> VoiceBroadcastPlaybackCoordinator? {
|
||||
coordinatorsForEventIdentifiers[eventIdentifier]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user