diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-22 19:26:08 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-22 19:26:08 +0200 |
commit | bf0b3fe351b530b64768afe03fdeaa7a130dbcde (patch) | |
tree | 3b9d472fa1b982ec79bd8bac22797f5f2ede92ab /src/main/java/de/pixart/messenger/ui | |
parent | 2df04a8811d7b042fed013cdc24504733a251130 (diff) |
fixed read event when status messages are displayed
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 3e4962cdb..1feb40b1f 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1855,7 +1855,13 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } int pos = binding.messagesView.getLastVisiblePosition(); if (pos >= 0) { - Message message = (Message) binding.messagesView.getItemAtPosition(pos); + Message message = null; + for (int i = pos; i >= 0; --i) { + message = (Message) binding.messagesView.getItemAtPosition(i); + if (message.getType() != Message.TYPE_STATUS) { + break; + } + } if (message != null) { while (message.next() != null && message.next().wasMergedIntoPrevious()) { message = message.next(); |