1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Simplification

This commit is contained in:
M66B 2021-02-14 20:41:17 +01:00
parent f48403c818
commit 7e6e54c433

View file

@ -3714,13 +3714,11 @@ class Core {
if (!(message.ui_seen || message.ui_ignored || message.ui_hide)) {
// This assumes the messages are properly ordered
groupMessages.get(group).add(message);
for (int i = groupMessages.get(group).size() - 1; i >= MAX_NOTIFICATION_COUNT; i--) {
TupleMessageEx overflow = groupMessages.get(group).remove(i);
Log.i("Notify overflow=" + overflow.id);
if (!overflow.ui_ignored)
db.message().setMessageUiIgnored(overflow.id, true);
if (groupMessages.get(group).size() < MAX_NOTIFICATION_COUNT)
groupMessages.get(group).add(message);
else {
if (!message.ui_ignored)
db.message().setMessageUiIgnored(message.id, true);
}
}
}