From b7f00ddac32d8938ae6a2ae94a6ca0255edbef6f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 8 Aug 2015 17:19:40 +0200 Subject: [PATCH] fixed image preview in notfications for images that arrived over jingle --- .../conversations/xmpp/jingle/JingleConnection.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index e9ca66b7c..29aafccef 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -97,15 +97,13 @@ public class JingleConnection implements Transferable { public void onFileTransmitted(DownloadableFile file) { if (responder.equals(account.getJid())) { sendSuccess(); - if (acceptedAutomatically) { - message.markUnread(); - JingleConnection.this.mXmppConnectionService - .getNotificationService().push(message); - } mXmppConnectionService.getFileBackend().updateFileParams(message); mXmppConnectionService.databaseBackend.createMessage(message); - mXmppConnectionService.markMessage(message, - Message.STATUS_RECEIVED); + mXmppConnectionService.markMessage(message,Message.STATUS_RECEIVED); + if (acceptedAutomatically) { + message.markUnread(); + JingleConnection.this.mXmppConnectionService.getNotificationService().push(message); + } } else { if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { file.delete();