From c09551b4c01c22077fbe5dd783b1c7c893bb7e73 Mon Sep 17 00:00:00 2001 From: kosyak Date: Mon, 13 Nov 2023 22:27:18 +0100 Subject: [PATCH] fix sorting --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();