From 989ca229a2d4f32dde5ef4607dfbe96679e69b29 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 15 Nov 2014 14:40:43 +0100 Subject: fixed description in notifications and conversation overview --- .../siacs/conversations/xmpp/jingle/JingleConnection.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java') 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 febd4f57..d6bcf55b 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -18,6 +18,7 @@ import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.Downloadable; import eu.siacs.conversations.entities.DownloadableFile; +import eu.siacs.conversations.entities.DownloadablePlaceholder; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.xml.Element; @@ -96,7 +97,6 @@ public class JingleConnection implements Downloadable { mXmppConnectionService.markMessage(message, Message.STATUS_RECEIVED); } else { - message.setDownloadable(null); if (message.getEncryption() == Message.ENCRYPTION_PGP || message.getEncryption() == Message.ENCRYPTION_DECRYPTED) { file.delete(); } @@ -710,6 +710,10 @@ public class JingleConnection implements Downloadable { this.mXmppConnectionService.markMessage(this.message, Message.STATUS_SEND); this.disconnectSocks5Connections(); + if (this.transport != null && this.transport instanceof JingleInbandTransport) { + this.transport.disconnect(); + } + this.message.setDownloadable(null); this.mJingleConnectionManager.finishConnection(this); } @@ -721,7 +725,7 @@ public class JingleConnection implements Downloadable { this.sendCancel(); this.mJingleConnectionManager.finishConnection(this); if (this.responder.equals(account.getJid())) { - this.mStatus = Downloadable.STATUS_FAILED; + this.message.setDownloadable(new DownloadablePlaceholder(Downloadable.STATUS_FAILED)); this.mXmppConnectionService.updateConversationUi(); } else { this.mXmppConnectionService.markMessage(this.message, @@ -733,9 +737,12 @@ public class JingleConnection implements Downloadable { private void fail() { this.mJingleStatus = JINGLE_STATUS_FAILED; this.disconnectSocks5Connections(); + if (this.transport != null && this.transport instanceof JingleInbandTransport) { + this.transport.disconnect(); + } if (this.message != null) { if (this.responder.equals(account.getJid())) { - this.mStatus = Downloadable.STATUS_FAILED; + this.message.setDownloadable(new DownloadablePlaceholder(Downloadable.STATUS_FAILED)); this.mXmppConnectionService.updateConversationUi(); } else { this.mXmppConnectionService.markMessage(this.message, -- cgit v1.2.3