diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-05-09 20:48:56 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-05-09 20:48:56 +0200 |
commit | c0afad2fcd2be07834f64625204984879880afd5 (patch) | |
tree | 4d936b19362d1f4acd01d982e88813661fc7eb42 /src/main/java/de/pixart/messenger/parser | |
parent | 699dbe2e2a56ac36160950c1ac06b16f59eab6c1 (diff) |
avoid race conditions when downloading files or decrypting pgp messages
and waiting for sm catchup
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index 76519eda8..d503eb95e 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -613,9 +613,6 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece } else if (notify) { if (query != null && query.isCatchup()) { mXmppConnectionService.getNotificationService().pushFromBacklog(message); - } else if (account.getXmppConnection().isWaitingForSmCatchup()) { - account.getXmppConnection().incrementSmCatchupMessageCounter(); - mXmppConnectionService.getNotificationService().pushFromBacklog(message); } else { mXmppConnectionService.getNotificationService().push(message); } @@ -686,7 +683,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if (displayed != null) { if (packet.fromAccount(account)) { Conversation conversation = mXmppConnectionService.find(account, counterpart.toBareJid()); - if (conversation != null) { + if (conversation != null && (query == null || query.isCatchup())) { mXmppConnectionService.markRead(conversation); } } else { |