diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-06-15 12:44:29 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-19 20:02:11 +0200 |
commit | 0435f9278047dae73f1502e30c9978ce91ef9e96 (patch) | |
tree | dca655fd0e38c5f9c520a9f22e167e9cc5a256b1 /src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | |
parent | d12a57cbb362d6158c7b4c5f70074b3c829308ea (diff) |
delay notification until after pgp decryption
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 92cc2c664..c46f2b977 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -132,11 +132,12 @@ public class HttpDownloadConnection implements Transferable { mXmppConnectionService.getFileBackend().updateMediaScanner(file); message.setTransferable(null); mHttpConnectionManager.finishConnection(this); + boolean notify = acceptedAutomatically && !message.isRead(); if (message.getEncryption() == Message.ENCRYPTION_PGP) { - message.getConversation().getAccount().getPgpDecryptionService().decrypt(message); + notify = message.getConversation().getAccount().getPgpDecryptionService().decrypt(message, notify); } mXmppConnectionService.updateConversationUi(); - if (acceptedAutomatically) { + if (notify) { mXmppConnectionService.getNotificationService().push(message); } } |