fix: Disable BackgroundMessageView button when it's clicked (#742)
This commit is contained in:
parent
d6b36bf976
commit
3b5d7d3f2d
|
@ -126,7 +126,11 @@ class BackgroundMessageView @JvmOverloads constructor(
|
|||
binding.messageTextView.text = message
|
||||
binding.messageTextView.movementMethod = LinkMovementMethod.getInstance()
|
||||
binding.imageView.setImageResource(imageRes)
|
||||
binding.button.setOnClickListener(clickListener)
|
||||
binding.button.setOnClickListener {
|
||||
it.isEnabled = false
|
||||
clickListener?.invoke(it)
|
||||
}
|
||||
binding.button.isEnabled = true
|
||||
binding.button.visible(clickListener != null)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue