mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-19 10:25:29 +00:00
Added logging
This commit is contained in:
parent
8b29ea888a
commit
7b277737f5
1 changed files with 16 additions and 6 deletions
|
@ -1688,16 +1688,26 @@ class Core {
|
|||
" added=" + add.size() + " removed=" + remove.size() + " headers=" + headers);
|
||||
|
||||
if (notifications.size() == 0 ||
|
||||
(Build.VERSION.SDK_INT < Build.VERSION_CODES.O && headers > 0))
|
||||
nm.cancel("unseen." + group + ":0", 1);
|
||||
(Build.VERSION.SDK_INT < Build.VERSION_CODES.O && headers > 0)) {
|
||||
String tag = "unseen." + group + ":0";
|
||||
Log.i("Cancelling tag=" + tag);
|
||||
nm.cancel(tag, 1);
|
||||
}
|
||||
|
||||
for (Long id : remove)
|
||||
nm.cancel("unseen." + group + ":" + Math.abs(id), 1);
|
||||
for (Long id : remove) {
|
||||
String tag = "unseen." + group + ":" + Math.abs(id);
|
||||
Log.i("Cancelling tag=" + tag);
|
||||
nm.cancel(tag, 1);
|
||||
}
|
||||
|
||||
for (Notification notification : notifications) {
|
||||
long id = notification.extras.getLong("id", 0);
|
||||
if ((id == 0 && add.size() + remove.size() > 0) || add.contains(id))
|
||||
nm.notify("unseen." + group + ":" + Math.abs(id), 1, notification);
|
||||
if ((id == 0 && add.size() + remove.size() > 0) || add.contains(id)) {
|
||||
String tag = "unseen." + group + ":" + Math.abs(id);
|
||||
Log.i("Notifying tag=" + tag +
|
||||
(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? "" : " channel=" + notification.getChannelId()));
|
||||
nm.notify(tag, 1, notification);
|
||||
}
|
||||
}
|
||||
|
||||
if (all.size() > 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue