From d87fb539606d04e3d15b66c5cb82e0a0cb9c4164 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 17 Apr 2020 16:21:24 +0200 Subject: [PATCH] Show date header on sorting on unread, flagged or priority --- .../main/java/eu/faircode/email/FragmentMessages.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 3007757abb..8062dcfe69 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -330,6 +330,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. private static final long REVIEW_ASK_DELAY = 21 * 24 * 3600 * 1000L; // milliseconds private static final long REVIEW_LATER_DELAY = 3 * 24 * 3600 * 1000L; // milliseconds + private static final List SORT_DATE_HEADER = Collections.unmodifiableList(Arrays.asList( + "time", + "unread", + "starred", + "priority" + )); + private static final List DUPLICATE_ORDER = Collections.unmodifiableList(Arrays.asList( EntityFolder.INBOX, EntityFolder.OUTBOX, @@ -607,7 +614,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private View getView(View view, RecyclerView parent, int pos) { - if (!date || !"time".equals(adapter.getSort())) + if (!date || !SORT_DATE_HEADER.contains(adapter.getSort())) return null; if (pos == NO_POSITION)