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
if (groupMessages.get(group).size() < MAX_NOTIFICATION_COUNT)
groupMessages.get(group).add(message); groupMessages.get(group).add(message);
else {
for (int i = groupMessages.get(group).size() - 1; i >= MAX_NOTIFICATION_COUNT; i--) { if (!message.ui_ignored)
TupleMessageEx overflow = groupMessages.get(group).remove(i); db.message().setMessageUiIgnored(message.id, true);
Log.i("Notify overflow=" + overflow.id);
if (!overflow.ui_ignored)
db.message().setMessageUiIgnored(overflow.id, true);
} }
} }
} }

Loading…
Cancel
Save