mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 02:52:45 +02:00
Fix UI status at record startup and depending on the recording status
This commit is contained in:
+3
-3
@@ -37,13 +37,13 @@ struct VoiceBroadcastRecorderView: View {
|
||||
|
||||
HStack(alignment: .top, spacing: 16.0) {
|
||||
Button {
|
||||
if viewModel.viewState.recordingState == .started {
|
||||
if viewModel.viewState.recordingState != .stopped {
|
||||
viewModel.send(viewAction: .stop)
|
||||
} else {
|
||||
viewModel.send(viewAction: .start)
|
||||
}
|
||||
} label: {
|
||||
if viewModel.viewState.recordingState == .started {
|
||||
if viewModel.viewState.recordingState != .stopped {
|
||||
Image("voice_broadcast_stop")
|
||||
.renderingMode(.original)
|
||||
} else {
|
||||
@@ -56,7 +56,7 @@ struct VoiceBroadcastRecorderView: View {
|
||||
Button {
|
||||
if viewModel.viewState.recordingState == .paused {
|
||||
viewModel.send(viewAction: .resume)
|
||||
} else if viewModel.viewState.recordingState == .started {
|
||||
} else {
|
||||
viewModel.send(viewAction: .pause)
|
||||
}
|
||||
} label: {
|
||||
|
||||
@@ -37,6 +37,7 @@ class VoiceBroadcastRecorderViewModel: VoiceBroadcastRecorderViewModelType, Voic
|
||||
super.init(initialViewState: VoiceBroadcastRecorderViewState(details: details,
|
||||
recordingState: .stopped,
|
||||
bindings: VoiceBroadcastRecorderViewStateBindings()))
|
||||
process(viewAction: .start)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
Reference in New Issue
Block a user