Expose better broadcast details to the view

Starting from the sender name but we can add more things. This is up to the design expectation
This commit is contained in:
manuroe
2022-10-19 15:32:03 +02:00
committed by yostyle
parent e2f41f45f1
commit 79ca7b8dc0
8 changed files with 31 additions and 29 deletions
@@ -30,27 +30,30 @@ enum VoiceBroadcastPlaybackState {
case error
}
// TODO: Keept it? It is always player
enum VoiceBroadcastPlaybackType {
case player
case recorder
}
struct VoiceBroadcastPlaybackDetails {
var type: VoiceBroadcastPlaybackType
var chunks: [VoiceBroadcastChunk]
let type: VoiceBroadcastPlaybackType // TODO: Keept it? It is always player
let senderDisplayName: String?
}
struct VoiceBroadcastPlaybackViewState: BindableState {
var voiceBroadcast: VoiceBroadcastPlaybackDetails
var details: VoiceBroadcastPlaybackDetails
var playbackState: VoiceBroadcastPlaybackState
var bindings: VoiceBroadcastPlaybackViewStateBindings
}
struct VoiceBroadcastPlaybackViewStateBindings {
// TODO: Neeeded?
var alertInfo: AlertInfo<VoiceBroadcastPlaybackAlertType>?
}
enum VoiceBroadcastPlaybackAlertType {
// TODO: What is it?
case failedClosingVoiceBroadcast
}