mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Rename TimelineVoiceBroadcastCoordinator to controller
It has nothing todo with a coordinator. Start to follow the same naming as VoiceMessage. Remove SwiftUI VoiceBroadcastChunk to make it build
This commit is contained in:
+4
-4
@@ -20,7 +20,7 @@ class TimelineVoiceBroadcastProvider {
|
||||
static let shared = TimelineVoiceBroadcastProvider()
|
||||
|
||||
var session: MXSession?
|
||||
var coordinatorsForEventIdentifiers = [String: TimelineVoiceBroadcastCoordinator]()
|
||||
var coordinatorsForEventIdentifiers = [String: VoiceBroadcastPlaybackController]()
|
||||
|
||||
private init() { }
|
||||
|
||||
@@ -35,8 +35,8 @@ class TimelineVoiceBroadcastProvider {
|
||||
return coordinator.toPresentable().view
|
||||
}
|
||||
|
||||
let parameters = TimelineVoiceBroadcastCoordinatorParameters(session: session, room: room, voiceBroadcastStartEvent: event)
|
||||
guard let coordinator = try? TimelineVoiceBroadcastCoordinator(parameters: parameters) else {
|
||||
let parameters = VoiceBroadcastPlaybackControllerParameters(session: session, room: room, voiceBroadcastStartEvent: event)
|
||||
guard let coordinator = try? VoiceBroadcastPlaybackController(parameters: parameters) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class TimelineVoiceBroadcastProvider {
|
||||
}
|
||||
|
||||
/// Retrieve the voiceBroadcast timeline coordinator for the given event or nil if it hasn't been created yet
|
||||
func timelineVoiceBroadcastCoordinatorForEventIdentifier(_ eventIdentifier: String) -> TimelineVoiceBroadcastCoordinator? {
|
||||
func voiceBroadcastPlaybackControllerForEventIdentifier(_ eventIdentifier: String) -> VoiceBroadcastPlaybackController? {
|
||||
coordinatorsForEventIdentifiers[eventIdentifier]
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -18,18 +18,18 @@ import Combine
|
||||
import MatrixSDK
|
||||
import SwiftUI
|
||||
|
||||
struct TimelineVoiceBroadcastCoordinatorParameters {
|
||||
struct VoiceBroadcastPlaybackControllerParameters {
|
||||
let session: MXSession
|
||||
let room: MXRoom
|
||||
let voiceBroadcastStartEvent: MXEvent
|
||||
}
|
||||
|
||||
final class TimelineVoiceBroadcastCoordinator: Coordinator, Presentable, VoiceBroadcastAggregatorDelegate {
|
||||
final class VoiceBroadcastPlaybackController: Coordinator, Presentable, VoiceBroadcastAggregatorDelegate {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let parameters: TimelineVoiceBroadcastCoordinatorParameters
|
||||
private let parameters: VoiceBroadcastPlaybackControllerParameters
|
||||
private let selectedAnswerIdentifiersSubject = PassthroughSubject<[String], Never>()
|
||||
|
||||
private var voiceBroadcastAggregator: VoiceBroadcastAggregator
|
||||
@@ -43,7 +43,7 @@ final class TimelineVoiceBroadcastCoordinator: Coordinator, Presentable, VoiceBr
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(parameters: TimelineVoiceBroadcastCoordinatorParameters) throws {
|
||||
init(parameters: VoiceBroadcastPlaybackControllerParameters) throws {
|
||||
self.parameters = parameters
|
||||
|
||||
try voiceBroadcastAggregator = VoiceBroadcastAggregator(session: parameters.session, room: parameters.room, voiceBroadcastStartEventId: parameters.voiceBroadcastStartEvent.eventId)
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// Copyright 2022 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
//TODO: VB remove duplicated class or struct
|
||||
/// Represents user live location
|
||||
struct VoiceBroadcastChunk {
|
||||
/// Chunk sequence number
|
||||
let sequence: UInt
|
||||
|
||||
/// Chunk file url
|
||||
let url: URL
|
||||
}
|
||||
Reference in New Issue
Block a user