Do not pause already paused voice broadcast
This commit is contained in:
parent
53db04c8cf
commit
85bc78bd72
@ -234,7 +234,7 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), A
|
|||||||
}
|
}
|
||||||
// TODO remove this when there will be a recording indicator outside of the timeline
|
// TODO remove this when there will be a recording indicator outside of the timeline
|
||||||
// Pause voice broadcast if the timeline is not shown anymore
|
// Pause voice broadcast if the timeline is not shown anymore
|
||||||
it.isVoiceBroadcasting && !requireActivity().isChangingConfigurations -> timelineViewModel.handle(VoiceBroadcastAction.Recording.Pause)
|
it.isRecordingVoiceBroadcast && !requireActivity().isChangingConfigurations -> timelineViewModel.handle(VoiceBroadcastAction.Recording.Pause)
|
||||||
else -> {
|
else -> {
|
||||||
timelineViewModel.handle(VoiceBroadcastAction.Listening.Pause)
|
timelineViewModel.handle(VoiceBroadcastAction.Listening.Pause)
|
||||||
messageComposerViewModel.handle(MessageComposerAction.OnEntersBackground(composer.text.toString()))
|
messageComposerViewModel.handle(MessageComposerAction.OnEntersBackground(composer.text.toString()))
|
||||||
|
@ -79,9 +79,8 @@ data class MessageComposerViewState(
|
|||||||
is VoiceMessageRecorderView.RecordingUiState.Recording -> true
|
is VoiceMessageRecorderView.RecordingUiState.Recording -> true
|
||||||
}
|
}
|
||||||
|
|
||||||
val isVoiceBroadcasting = when (voiceBroadcastState) {
|
val isRecordingVoiceBroadcast = when (voiceBroadcastState) {
|
||||||
VoiceBroadcastState.STARTED,
|
VoiceBroadcastState.STARTED,
|
||||||
VoiceBroadcastState.PAUSED,
|
|
||||||
VoiceBroadcastState.RESUMED -> true
|
VoiceBroadcastState.RESUMED -> true
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user