diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-24 20:51:43 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-24 20:51:43 +0100 |
commit | 0a6eb6630612cda0ce6a9ec896d81281efd9631f (patch) | |
tree | 6d23fc18a156a0d46d9e201f05f45a273b9699f5 /src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java | |
parent | 6b50aad97951561dca537ef5e3094b59a8c76ed1 (diff) |
put images into MessageStyle notifications
Diffstat (limited to 'src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java index cf867d796..b20e57e3f 100644 --- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java +++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java @@ -146,7 +146,6 @@ public class HttpDownloadConnection implements Transferable { } private void finish() { - mXmppConnectionService.getFileBackend().updateMediaScanner(file); message.setTransferable(null); mHttpConnectionManager.finishConnection(this); boolean notify = acceptedAutomatically && !message.isRead(); @@ -154,9 +153,12 @@ public class HttpDownloadConnection implements Transferable { notify = message.getConversation().getAccount().getPgpDecryptionService().decrypt(message, notify); } mHttpConnectionManager.updateConversationUi(true); - if (notify) { - mXmppConnectionService.getNotificationService().push(message); - } + final boolean notifyAfterScan = notify; + mXmppConnectionService.getFileBackend().updateMediaScanner(file, () -> { + if (notifyAfterScan) { + mXmppConnectionService.getNotificationService().push(message); + } + }); } private void changeStatus(int status) { |