Fixed deadlock (ANR) while playing voice recording
This commit is contained in:
parent
b47ae48529
commit
138635230a
1 changed files with 3 additions and 1 deletions
|
@ -384,7 +384,9 @@ class ChatMessageContentData(
|
|||
voiceRecordingPlayer.start()
|
||||
isVoiceRecordPlaying.value = true
|
||||
tickerFlow().onEach {
|
||||
voiceRecordPlayingPosition.postValue(voiceRecordingPlayer.currentPosition)
|
||||
withContext(Dispatchers.Main) {
|
||||
voiceRecordPlayingPosition.value = voiceRecordingPlayer.currentPosition
|
||||
}
|
||||
}.launchIn(scope)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue