adding sending of voice message on send pressed

This commit is contained in:
Adam Brown 2021-11-18 17:18:13 +00:00
parent c5746a59ae
commit 16ca7d5040

View file

@ -721,6 +721,7 @@ class RoomDetailFragment @Inject constructor(
}
override fun onSendVoiceMessage() {
roomDetailViewModel.handle(RoomDetailAction.EndRecordingVoiceMessage(isCancelled = false))
updateRecordingUiState(RecordingUiState.None)
}
@ -730,13 +731,13 @@ class RoomDetailFragment @Inject constructor(
}
override fun onRecordingLimitReached() {
updateRecordingUiState(RecordingUiState.Playback)
roomDetailViewModel.handle(RoomDetailAction.PauseRecordingVoiceMessage)
updateRecordingUiState(RecordingUiState.Playback)
}
override fun onRecordingWaveformClicked() {
updateRecordingUiState(RecordingUiState.Playback)
roomDetailViewModel.handle(RoomDetailAction.PauseRecordingVoiceMessage)
updateRecordingUiState(RecordingUiState.Playback)
}
private fun updateRecordingUiState(state: RecordingUiState) {