mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
fix: prevent crash in audio view
This commit is contained in:
parent
c153ea2acf
commit
8701f68292
@ -45,7 +45,9 @@ class VoiceMessageView : LinearLayout, AudioSlidePlayer.Listener {
|
|||||||
val player = AudioSlidePlayer.createFor(context, audio, this)
|
val player = AudioSlidePlayer.createFor(context, audio, this)
|
||||||
this.player = player
|
this.player = player
|
||||||
isPreparing = true
|
isPreparing = true
|
||||||
|
if (!audio.isPendingDownload && !audio.isInProgress) {
|
||||||
player.play(0.0)
|
player.play(0.0)
|
||||||
|
}
|
||||||
voiceMessageViewLoader.isVisible = audio.isPendingDownload
|
voiceMessageViewLoader.isVisible = audio.isPendingDownload
|
||||||
val cornerRadii = MessageBubbleUtilities.calculateRadii(context, isStartOfMessageCluster, isEndOfMessageCluster, message.isOutgoing)
|
val cornerRadii = MessageBubbleUtilities.calculateRadii(context, isStartOfMessageCluster, isEndOfMessageCluster, message.isOutgoing)
|
||||||
cornerMask.setTopLeftRadius(cornerRadii[0])
|
cornerMask.setTopLeftRadius(cornerRadii[0])
|
||||||
|
@ -33,7 +33,7 @@ class AttachmentUploadJob(val attachmentID: Long, val threadID: String, val mess
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
override val maxFailureCount: Int = 20
|
override val maxFailureCount: Int = 2
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val TAG = AttachmentUploadJob::class.simpleName
|
val TAG = AttachmentUploadJob::class.simpleName
|
||||||
|
@ -22,7 +22,7 @@ class MessageSendJob(val message: Message, val destination: Destination) : Job {
|
|||||||
override var id: String? = null
|
override var id: String? = null
|
||||||
override var failureCount: Int = 0
|
override var failureCount: Int = 0
|
||||||
|
|
||||||
override val maxFailureCount: Int = 10
|
override val maxFailureCount: Int = 2
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val TAG = MessageSendJob::class.simpleName
|
val TAG = MessageSendJob::class.simpleName
|
||||||
|
Loading…
Reference in New Issue
Block a user