mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 17:26:12 +00:00
Prevent race condition
This commit is contained in:
parent
4c41baa3d8
commit
6491532c2d
1 changed files with 6 additions and 2 deletions
|
@ -5619,8 +5619,12 @@ class Core {
|
|||
|
||||
if (message.notifying == 0) {
|
||||
// Handle clear notifying on boot/update
|
||||
data.groupNotifying.get(group).remove(message.id);
|
||||
data.groupNotifying.get(group).remove(-message.id);
|
||||
EntityMessage msg = db.message().getMessage(message.id);
|
||||
if (msg != null && msg.notifying == 0) {
|
||||
EntityLog.log(context, "Notify boot=" + msg.id);
|
||||
data.groupNotifying.get(group).remove(msg.id);
|
||||
data.groupNotifying.get(group).remove(-msg.id);
|
||||
}
|
||||
} else {
|
||||
long id = message.id * message.notifying;
|
||||
if (!data.groupNotifying.get(group).contains(id) &&
|
||||
|
|
Loading…
Reference in a new issue