mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed resend menu not visible when message goes into error state unless conversation is left & opened again
This commit is contained in:
parent
ec9c7bd070
commit
ef79475525
2 changed files with 5 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ class MessageModel
|
|||
|
||||
val isOutgoing = chatMessage.isOutgoing
|
||||
|
||||
val isInError = chatMessage.state == ChatMessage.State.NotDelivered
|
||||
val isInError = MutableLiveData<Boolean>()
|
||||
|
||||
val timestamp = chatMessage.time
|
||||
|
||||
|
|
@ -224,6 +224,7 @@ class MessageModel
|
|||
}
|
||||
}
|
||||
}
|
||||
isInError.postValue(messageState == ChatMessage.State.NotDelivered)
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
|
@ -297,6 +298,8 @@ class MessageModel
|
|||
init {
|
||||
updateAvatarModel()
|
||||
|
||||
isInError.postValue(chatMessage.state == ChatMessage.State.NotDelivered)
|
||||
|
||||
groupedWithNextMessage.postValue(isGroupedWithNextOne)
|
||||
groupedWithPreviousMessage.postValue(isGroupedWithPreviousOne)
|
||||
isPlayingVoiceRecord.postValue(false)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ class ChatMessageLongPressViewModel : GenericViewModel() {
|
|||
|
||||
val onDismissedEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
||||
private lateinit var emojiBottomSheet: ChatBubbleEmojiPickerBottomSheetBinding
|
||||
private lateinit var emojiBottomSheetBehavior: BottomSheetBehavior<View>
|
||||
|
||||
init {
|
||||
|
|
@ -91,7 +90,7 @@ class ChatMessageLongPressViewModel : GenericViewModel() {
|
|||
hideCopyTextToClipboard.value = model.text.value.isNullOrEmpty()
|
||||
isChatRoomReadOnly.value = model.chatRoomIsReadOnly
|
||||
isMessageOutgoing.value = model.isOutgoing
|
||||
isMessageInError.value = model.isInError
|
||||
isMessageInError.value = model.isInError.value == true
|
||||
horizontalBias.value = if (model.isOutgoing) 1f else 0f
|
||||
messageModel.value = model
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue