diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 655244e26..e4b71c0da 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -675,7 +675,7 @@ public class ConversationFragment extends XmppFragment @Override public boolean onActionItemClicked(ActionMode mode, MenuItem item) { - Collections.sort(selectedMessages, (o1, o2) -> Long.compare(o1.getTimeSent(), o2.getMergedTimeSent())); + Collections.sort(selectedMessages, Comparator.comparingLong(Message::getTimeSent)); if (item.getItemId() == R.id.copy_message) { StringBuilder sb = new StringBuilder();