aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-01 23:29:53 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-01 23:29:53 +0200
commit41f81723f55c421e5479373bb97eac6733dfb0ea (patch)
tree27737309616ea45b0f582fabc1c175a33697ac63 /src/main/java/de/pixart/messenger/entities
parent0534717f1ed05bbcc8789f8105a77df6823c69e6 (diff)
reorder and scroll down after resending a message
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index b41805987..9a856a738 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -17,7 +17,6 @@ import org.json.JSONObject;
import java.security.interfaces.DSAPublicKey;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
@@ -1017,16 +1016,13 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public void sort() {
synchronized (this.messages) {
- Collections.sort(this.messages, new Comparator<Message>() {
- @Override
- public int compare(Message left, Message right) {
- if (left.getTimeSent() < right.getTimeSent()) {
- return -1;
- } else if (left.getTimeSent() > right.getTimeSent()) {
- return 1;
- } else {
- return 0;
- }
+ Collections.sort(this.messages, (left, right) -> {
+ if (left.getTimeSent() < right.getTimeSent()) {
+ return -1;
+ } else if (left.getTimeSent() > right.getTimeSent()) {
+ return 1;
+ } else {
+ return 0;
}
});
untieMessages();