diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index 60015b0fa3..dc538bd72b 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -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) {