Skip to content

Commit

Permalink
Fixed lifecycle bug - recording and locked UI now ends after app exits
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <[email protected]>
  • Loading branch information
rapterjet2004 committed Nov 22, 2023
1 parent ec44763 commit ed88c6b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ class ChatActivity :
binding.messageInputView.messageInput.setText(text)
}
this.lifecycle.addObserver(AudioUtils)
isVoiceRecordingLocked = false
endVoiceRecordingUI()
}

override fun onStop() {
Expand All @@ -525,6 +527,7 @@ class ChatActivity :
stopPreviewVoicePlaying()
if (isMicInputAudioThreadRunning) {
stopMicInputRecordingAnimation()
stopAndDiscardAudioRecording()
}
if (mediaRecorderState == MediaRecorderState.RECORDING) {
stopAudioRecording()
Expand Down

0 comments on commit ed88c6b

Please sign in to comment.