diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-01 23:29:53 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-01 23:29:53 +0200 |
commit | 41f81723f55c421e5479373bb97eac6733dfb0ea (patch) | |
tree | 27737309616ea45b0f582fabc1c175a33697ac63 /src/main/java/de/pixart/messenger/entities | |
parent | 0534717f1ed05bbcc8789f8105a77df6823c69e6 (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.java | 18 |
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(); |