mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
New messages: check changes early
This commit is contained in:
parent
f19ea639fb
commit
5aac79a205
1 changed files with 7 additions and 5 deletions
|
@ -5263,6 +5263,13 @@ class Core {
|
||||||
" ignored=" + message.ui_ignored +
|
" ignored=" + message.ui_ignored +
|
||||||
" hide=" + message.ui_hide);
|
" hide=" + message.ui_hide);
|
||||||
else {
|
else {
|
||||||
|
// Prevent reappearing notifications
|
||||||
|
EntityMessage msg = db.message().getMessage(message.id);
|
||||||
|
if (msg == null || msg.ui_ignored) {
|
||||||
|
Log.i("Notify skip id=" + message.id + " msg=" + (msg != null));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Integer current = newMessages.get(group);
|
Integer current = newMessages.get(group);
|
||||||
newMessages.put(group, current == null ? 1 : current + 1);
|
newMessages.put(group, current == null ? 1 : current + 1);
|
||||||
|
|
||||||
|
@ -5296,11 +5303,6 @@ class Core {
|
||||||
remove.remove(id);
|
remove.remove(id);
|
||||||
Log.i("Notify existing=" + id);
|
Log.i("Notify existing=" + id);
|
||||||
} else {
|
} else {
|
||||||
EntityMessage msg = db.message().getMessage(message.id);
|
|
||||||
if (msg == null || msg.ui_ignored) {
|
|
||||||
Log.i("Notify skip id=" + message.id + " msg=" + (msg != null));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
boolean existing = remove.contains(-id);
|
boolean existing = remove.contains(-id);
|
||||||
if (existing) {
|
if (existing) {
|
||||||
if (message.content && notify_preview) {
|
if (message.content && notify_preview) {
|
||||||
|
|
Loading…
Reference in a new issue