From 47ad6bf5b548018cbbb7ba1c0b8d5fd922ba2611 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 24 Feb 2018 15:53:31 +0100 Subject: MAM: look at total count for completness. parse fin correctly --- src/main/java/de/pixart/messenger/entities/Conversation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/pixart/messenger/entities') diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 223e26dd2..b41805987 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -991,9 +991,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl } } - public void prepend(Message message) { + public void prepend(int offset, Message message) { synchronized (this.messages) { - this.messages.add(0, message); + this.messages.add(Math.min(offset, this.messages.size()), message); } } -- cgit v1.2.3