Merge pull request #625 from hjubb/ui

Fix Audio Player Crash
This commit is contained in:
Niels Andriesse 2021-07-01 14:07:46 +10:00 committed by GitHub
commit 2e1c97f1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,7 +45,9 @@ class VoiceMessageView : LinearLayout, AudioSlidePlayer.Listener {
val player = AudioSlidePlayer.createFor(context, audio, this)
this.player = player
isPreparing = true
player.play(0.0)
if (!audio.isPendingDownload && !audio.isInProgress) {
player.play(0.0)
}
voiceMessageViewLoader.isVisible = audio.isPendingDownload
val cornerRadii = MessageBubbleUtilities.calculateRadii(context, isStartOfMessageCluster, isEndOfMessageCluster, message.isOutgoing)
cornerMask.setTopLeftRadius(cornerRadii[0])