Ignore notify overflow

This commit is contained in:
M66B 2020-08-16 19:10:10 +02:00
parent c471727f3c
commit 5c9155819c
1 changed files with 8 additions and 6 deletions

View File

@ -3319,10 +3319,10 @@ class Core {
if (notify_preview && notify_preview_only && !message.content)
continue;
if (foreground && notify_background_only && message.notifying >= 0) {
Log.i("Notify foreground=" + message.id + " notifying=" + message.notifying);
if (message.notifying == 0)
db.message().setMessageNotifying(message.id, 1);
if (foreground && notify_background_only && message.notifying == 0) {
Log.i("Notify foreground=" + message.id);
if (!message.ui_ignored)
db.message().setMessageUiIgnored(message.id, true);
continue;
}
@ -3347,8 +3347,10 @@ class Core {
// This assumes the messages are properly ordered
if (groupMessages.get(group).size() < MAX_NOTIFICATION_COUNT)
groupMessages.get(group).add(message);
else
db.message().setMessageNotifying(message.id, 1);
else {
if (!message.ui_ignored)
db.message().setMessageUiIgnored(message.id, true);
}
}
}