From 2edab214233dc3077df7bb4d59ebb9d8a630d432 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 16 Oct 2018 12:18:25 +0200 Subject: [PATCH] render 'read up to this point' in 1:1 when followed by date bubble fixes #3237 --- .../conversations/ui/ConversationFragment.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index e457fa6c0..220e0a3ad 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2296,13 +2296,16 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke this.messageList.add(Message.createStatusMessage(conversation, getString(R.string.contact_has_stopped_typing, conversation.getName()))); } else { for (int i = this.messageList.size() - 1; i >= 0; --i) { - if (this.messageList.get(i).getStatus() == Message.STATUS_RECEIVED) { - return; - } else { - if (this.messageList.get(i).getStatus() == Message.STATUS_SEND_DISPLAYED) { - this.messageList.add(i + 1, - Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName()))); + final Message message = this.messageList.get(i); + if (message.getType() != Message.TYPE_STATUS) { + if (message.getStatus() == Message.STATUS_RECEIVED) { return; + } else { + if (message.getStatus() == Message.STATUS_SEND_DISPLAYED) { + this.messageList.add(i + 1, + Message.createStatusMessage(conversation, getString(R.string.contact_has_read_up_to_this_point, conversation.getName()))); + return; + } } } }