Simplification

pull/194/head
M66B 4 years ago
parent f48403c818
commit 7e6e54c433

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

Loading…
Cancel
Save