Skip to content

Commit

Permalink
fixed bug with audio messages not sending after pausing in continuous…
Browse files Browse the repository at this point in the history
… recording mode

Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Sep 17, 2023
1 parent f80d7d0 commit c78cb1b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c78cb1b

Please sign in to comment.