From 3d632fd900753d5fec41e8aea8ab1cbfec9cfb1c Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 8 Apr 2021 08:03:06 +0200 Subject: [PATCH] Report total number of new messages --- app/src/main/java/eu/faircode/email/Core.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 20f45def15..6b23ecec7f 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -4005,7 +4005,7 @@ class Core { // Build notifications List notifications = getNotificationUnseen(context, group, groupMessages.get(group), - notify_summary, current - prev, + notify_summary, current - prev, current, redacted); Log.i("Notify group=" + group + @@ -4069,7 +4069,7 @@ class Core { private static List getNotificationUnseen( Context context, long group, List messages, - boolean notify_summary, int new_messages, boolean redacted) { + boolean notify_summary, int new_messages, int total_messages, boolean redacted) { List notifications = new ArrayList<>(); // Android 7+ N https://developer.android.com/training/notify-user/group @@ -4160,7 +4160,7 @@ class Core { // Build title String title = context.getResources().getQuantityString( - R.plurals.title_notification_unseen, messages.size(), messages.size()); + R.plurals.title_notification_unseen, total_messages, total_messages); long cgroup = (group >= 0 ? group @@ -4174,7 +4174,7 @@ class Core { : R.drawable.baseline_mail_white_24) .setContentTitle(title) .setContentIntent(piContent) - .setNumber(messages.size()) + .setNumber(total_messages) .setDeleteIntent(piClear) .setPriority(NotificationCompat.PRIORITY_DEFAULT) .setCategory(notify_summary