Avoid race condition with TextFuture when setting message text
Change-Id: I7de99faf565b73a67aceeaf646fec6e6d56123c8
This commit is contained in:
parent
bbb2a631cf
commit
57d3f3bc68
|
@ -122,6 +122,8 @@ abstract class MessageTextItem : AbsMessageItem<MessageTextItem.Holder>() {
|
||||||
if (canUseTextFuture) {
|
if (canUseTextFuture) {
|
||||||
holder.messageView.setTextFuture(textFuture)
|
holder.messageView.setTextFuture(textFuture)
|
||||||
} else {
|
} else {
|
||||||
|
// Remove possible previously set futures that might overwrite our text
|
||||||
|
holder.messageView.setTextFuture(null)
|
||||||
holder.messageView.text = message
|
holder.messageView.text = message
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue