Show relative date/time when grouping by week

This commit is contained in:
M66B 2022-09-18 17:47:47 +02:00
parent dabc89bc27
commit c57692c05c
1 changed files with 3 additions and 1 deletions

View File

@ -258,6 +258,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private float textSize;
private boolean date;
private boolean week;
private boolean cards;
private boolean shadow_unread;
private boolean shadow_highlight;
@ -1397,7 +1398,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
message.totalSize != null && ("size".equals(sort) || "attachments".equals(sort))
? View.VISIBLE : View.GONE);
SpannableStringBuilder time = new SpannableStringBuilderEx(
date && FragmentMessages.SORT_DATE_HEADER.contains(sort)
(date && !week) && FragmentMessages.SORT_DATE_HEADER.contains(sort)
? TF.format(message.received)
: Helper.getRelativeTimeSpanString(context, message.received));
if (show_recent && message.recent)
@ -7242,6 +7243,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean generated = prefs.getBoolean("generated_icons", true);
this.date = prefs.getBoolean("date", true);
this.week = prefs.getBoolean("date_week", false);
this.cards = prefs.getBoolean("cards", true);
this.shadow_unread = prefs.getBoolean("shadow_unread", false);
this.shadow_highlight = prefs.getBoolean("shadow_highlight", false);