aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-01-24 20:51:43 +0100
committerChristian Schneppe <christian@pix-art.de>2019-01-24 20:51:43 +0100
commit0a6eb6630612cda0ce6a9ec896d81281efd9631f (patch)
tree6d23fc18a156a0d46d9e201f05f45a273b9699f5 /src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java
parent6b50aad97951561dca537ef5e3094b59a8c76ed1 (diff)
put images into MessageStyle notifications
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java b/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java
index 1c1a995a9..8f01c6982 100644
--- a/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java
+++ b/src/main/java/de/pixart/messenger/crypto/PgpDecryptionService.java
@@ -135,6 +135,7 @@ public class PgpDecryptionService {
}
private void executeApi(Message message) {
+ boolean skipNotificationPush = false;
synchronized (message) {
Intent params = userInteractionResult != null ? userInteractionResult : new Intent();
params.setAction(OpenPgpApi.ACTION_DECRYPT_VERIFY);
@@ -209,8 +210,9 @@ public class PgpDecryptionService {
mXmppConnectionService.getFileBackend().updateFileParams(message, url);
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
inputFile.delete();
- mXmppConnectionService.getFileBackend().updateMediaScanner(outputFile);
mXmppConnectionService.updateMessage(message);
+ skipNotificationPush = true;
+ mXmppConnectionService.getFileBackend().updateMediaScanner(outputFile, () -> notifyIfPending(message));
break;
case OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED:
synchronized (PgpDecryptionService.this) {
@@ -231,7 +233,9 @@ public class PgpDecryptionService {
}
}
}
- notifyIfPending(message);
+ if (!skipNotificationPush) {
+ notifyIfPending(message);
+ }
}
private synchronized void notifyIfPending(Message message) {