aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/http
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-15 12:44:29 +0200
committerChristian Schneppe <christian@pix-art.de>2016-06-19 20:02:11 +0200
commit0435f9278047dae73f1502e30c9978ce91ef9e96 (patch)
treedca655fd0e38c5f9c520a9f22e167e9cc5a256b1 /src/main/java/eu/siacs/conversations/http
parentd12a57cbb362d6158c7b4c5f70074b3c829308ea (diff)
delay notification until after pgp decryption
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java5
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);
}
}