Removed VoiceBroadcastProtocol

We do not need to abstract it
This commit is contained in:
manuroe
2022-10-19 09:38:36 +02:00
parent 92d9c2ea70
commit 4361c9fc9b
4 changed files with 5 additions and 10 deletions
@@ -48,7 +48,7 @@ public class VoiceBroadcastAggregator {
private var events: [MXEvent] = []
public private(set) var voiceBroadcast: VoiceBroadcastProtocol! {
public private(set) var voiceBroadcast: VoiceBroadcast! {
didSet {
delegate?.voiceBroadcastAggregatorDidUpdateData(self)
}
@@ -18,7 +18,7 @@ import Foundation
struct VoiceBroadcastBuilder {
func build(voiceBroadcastStartEventContent: VoiceBroadcastInfo, events: [MXEvent], currentUserIdentifier: String, hasBeenEdited: Bool = false) -> VoiceBroadcastProtocol {
func build(voiceBroadcastStartEventContent: VoiceBroadcastInfo, events: [MXEvent], currentUserIdentifier: String, hasBeenEdited: Bool = false) -> VoiceBroadcast {
let voiceBroadcast = VoiceBroadcast()
@@ -16,17 +16,12 @@
import Foundation
public protocol VoiceBroadcastProtocol {
var chunks: Set<VoiceBroadcastChunk> { get }
var kind: VoiceBroadcastKind { get }
}
public enum VoiceBroadcastKind {
case player
case recorder
}
class VoiceBroadcast: VoiceBroadcastProtocol {
public struct VoiceBroadcast {
var chunks: Set<VoiceBroadcastChunk> = []
var kind: VoiceBroadcastKind = .player
}