diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index db6fe41ca6..8b610a2f07 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -231,14 +231,19 @@ public class ServiceSynchronize extends LifecycleService { } } + int headers = 0; + for (Integer id : added) + if (id < 0) + headers++; + Log.i(Helper.TAG, "Notification account=" + account + - " notifications=" + notifications.size() + - " all=" + all.size() + " added=" + added.size() + " removed=" + removed.size()); + " notifications=" + notifications.size() + " all=" + all.size() + + " added=" + added.size() + " removed=" + removed.size() + " headers=" + headers); NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); if (notifications.size() == 0 || - (Build.VERSION.SDK_INT < Build.VERSION_CODES.O && added.size() > 0)) + (Build.VERSION.SDK_INT < Build.VERSION_CODES.O && headers > 0)) nm.cancel("unseen:" + account, 0); for (Integer id : removed)