mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed chat bubble when reply original message is missing (reply UI is hidden)
This commit is contained in:
parent
3c40bf3d6f
commit
187946bf34
1 changed files with 8 additions and 3 deletions
|
|
@ -111,7 +111,7 @@ class MessageModel
|
||||||
)?.params?.instantMessagingEncryptionMandatory == true
|
)?.params?.instantMessagingEncryptionMandatory == true
|
||||||
)
|
)
|
||||||
|
|
||||||
val isReply = chatMessage.isReply
|
val isReply = MutableLiveData<Boolean>()
|
||||||
|
|
||||||
val replyToMessageId = chatMessage.replyMessageId
|
val replyToMessageId = chatMessage.replyMessageId
|
||||||
|
|
||||||
|
|
@ -321,8 +321,11 @@ class MessageModel
|
||||||
updateReactionsList()
|
updateReactionsList()
|
||||||
|
|
||||||
computeContentsList()
|
computeContentsList()
|
||||||
if (isReply) {
|
if (chatMessage.isReply) {
|
||||||
|
// Wait to see if original message is found before setting isReply to true
|
||||||
computeReplyInfo()
|
computeReplyInfo()
|
||||||
|
} else {
|
||||||
|
isReply.postValue(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
coreContext.postOnMainThread {
|
coreContext.postOnMainThread {
|
||||||
|
|
@ -647,8 +650,10 @@ class MessageModel
|
||||||
val avatarModel = coreContext.contactsManager.getContactAvatarModelForAddress(from)
|
val avatarModel = coreContext.contactsManager.getContactAvatarModelForAddress(from)
|
||||||
replyTo.postValue(avatarModel.contactName ?: LinphoneUtils.getDisplayName(from))
|
replyTo.postValue(avatarModel.contactName ?: LinphoneUtils.getDisplayName(from))
|
||||||
replyText.postValue(LinphoneUtils.getFormattedTextDescribingMessage(replyMessage))
|
replyText.postValue(LinphoneUtils.getFormattedTextDescribingMessage(replyMessage))
|
||||||
|
isReply.postValue(true)
|
||||||
} else {
|
} else {
|
||||||
Log.e("$TAG Failed to find the reply message from ID [${chatMessage.replyMessageId}]")
|
Log.w("$TAG Failed to find the reply message from ID [${chatMessage.replyMessageId}]")
|
||||||
|
isReply.postValue(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue