mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 19:43:38 +00:00
Added some defensive coding to help prevent incorrect message statuses
This commit is contained in:
parent
f4fdfd7410
commit
a6f09c6fef
@ -207,10 +207,18 @@ class VisibleMessageView : LinearLayout {
|
||||
}
|
||||
if (message.isOutgoing) {
|
||||
val lastMessageID = mmsSmsDb.getLastMessageID(message.threadId)
|
||||
binding.messageStatusTextView.isVisible =
|
||||
!message.isSent || message.id == lastMessageID
|
||||
binding.messageStatusImageView.isVisible =
|
||||
!message.isSent || message.id == lastMessageID
|
||||
binding.messageStatusTextView.isVisible = (
|
||||
textId != null && (
|
||||
!message.isSent ||
|
||||
message.id == lastMessageID
|
||||
)
|
||||
)
|
||||
binding.messageStatusImageView.isVisible = (
|
||||
iconID != null && (
|
||||
!message.isSent ||
|
||||
message.id == lastMessageID
|
||||
)
|
||||
)
|
||||
} else {
|
||||
binding.messageStatusTextView.isVisible = false
|
||||
binding.messageStatusImageView.isVisible = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user