mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Show most recent new message notifications
This commit is contained in:
parent
704064ec2a
commit
abc8c6ac4e
1 changed files with 7 additions and 5 deletions
|
@ -3695,11 +3695,13 @@ class Core {
|
|||
|
||||
if (!(message.ui_seen || message.ui_ignored || message.ui_hide)) {
|
||||
// This assumes the messages are properly ordered
|
||||
if (groupMessages.get(group).size() < MAX_NOTIFICATION_COUNT)
|
||||
groupMessages.get(group).add(message);
|
||||
else {
|
||||
if (!message.ui_ignored)
|
||||
db.message().setMessageUiIgnored(message.id, true);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue