Set the summary notification time to latest message time

pull/215/head
M66B 1 year ago
parent e05c6dd016
commit 9a9b43fc91

@ -707,10 +707,15 @@ class NotificationHelper {
boolean delete_notification = prefs.getBoolean("delete_notification", false);
// Get contact info
Long latest = null;
Map<Long, Address[]> messageFrom = new HashMap<>();
Map<Long, ContactInfo[]> messageInfo = new HashMap<>();
for (int m = 0; m < messages.size() && m < MAX_NOTIFICATION_DISPLAY; m++) {
TupleMessageEx message = messages.get(m);
if (latest == null || latest < message.received)
latest = message.received;
ContactInfo[] info = ContactInfo.get(context,
message.account, message.folderType,
message.bimi_selector, Boolean.TRUE.equals(message.dmarc),
@ -782,6 +787,9 @@ class NotificationHelper {
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setAllowSystemGeneratedContextualActions(false);
if (latest != null)
builder.setWhen(latest).setShowWhen(true);
if (group != 0 && messages.size() > 0)
builder.setSubText(messages.get(0).accountName);

Loading…
Cancel
Save