From 4d27fd47a1f7d310211d17cd8a949e229b831e80 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 9 Nov 2022 17:31:05 +0100 Subject: [PATCH] Fix order in notifications --- .../ui/fragment/timeline/FragmentMastodonNotification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java index 04697e963..1e9045639 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonNotification.java @@ -596,7 +596,7 @@ public class FragmentMastodonNotification extends Fragment implements Notificati for (Notification notificationsAlreadyPresent : notificationList) { //We compare the date of each status and we only add status having a date greater than the another, it is inserted at this position //Pinned messages are ignored because their date can be older - if (notificationReceived.id.compareTo(notificationsAlreadyPresent.id) > 0) { + if (notificationReceived.created_at.after(notificationsAlreadyPresent.created_at)) { if (!notificationList.contains(notificationReceived)) { notificationList.add(position, notificationReceived); notificationAdapter.notifyItemInserted(position);