From c78cb1bff5a44f2592d2a42d7558a9fe8db96c0a Mon Sep 17 00:00:00 2001 From: Julius Linus Date: Sun, 17 Sep 2023 17:29:45 -0600 Subject: [PATCH] fixed bug with audio messages not sending after pausing in continuous recording mode Signed-off-by: rapterjet2004 --- .../java/com/nextcloud/talk/chat/ChatActivity.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 159a99b416..75243e4040 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -2142,19 +2142,15 @@ class ChatActivity : } private fun stopAndSendAudioRecording() { - if (isVoiceRecordingInProgress) { - stopAudioRecording() - Log.d(TAG, "stopped and sent audio recording") - val uri = Uri.fromFile(File(currentVoiceRecordFile)) - uploadFile(uri.toString(), true) - } + stopAudioRecording() + Log.d(TAG, "stopped and sent audio recording") + val uri = Uri.fromFile(File(currentVoiceRecordFile)) + uploadFile(uri.toString(), true) } private fun stopAndDiscardAudioRecording() { - if (isVoiceRecordingInProgress) { - stopAudioRecording() - Log.d(TAG, "stopped and discarded audio recording") - } + stopAudioRecording() + Log.d(TAG, "stopped and discarded audio recording") val cachedFile = File(currentVoiceRecordFile) cachedFile.delete()