aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java4
1 files changed, 2 insertions, 2 deletions
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);
}
}