aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-16 15:29:39 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-16 15:29:39 +0200
commit45e0f99b8841ed64f70c29e5c986509693833f92 (patch)
treec3428a31f5f228fcb5b53b26650a6ab497df4085 /src/eu
parent88d88ffb7b704e2ae5a2eaf1af6e8a21fb0fb574 (diff)
make image download message to type=image only after completion
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/http/HttpConnection.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/http/HttpConnection.java b/src/eu/siacs/conversations/http/HttpConnection.java
index 34036412..b0c230d0 100644
--- a/src/eu/siacs/conversations/http/HttpConnection.java
+++ b/src/eu/siacs/conversations/http/HttpConnection.java
@@ -62,8 +62,7 @@ public class HttpConnection implements Downloadable {
public void cancel() {
mHttpConnectionManager.finishConnection(this);
message.setDownloadable(null);
- message.setBody(mUrl.toString());
- mXmppConnectionService.updateMessage(message);
+ mXmppConnectionService.updateConversationUi();
}
private void finish() {
@@ -91,7 +90,6 @@ public class HttpConnection implements Downloadable {
return;
}
file.setExpectedSize(size);
- message.setType(Message.TYPE_IMAGE);
if (size <= mHttpConnectionManager.getAutoAcceptFileSize() && mAutostart) {
start();
} else {
@@ -159,6 +157,7 @@ public class HttpConnection implements Downloadable {
int imageWidth = options.outWidth;
message.setBody(mUrl.toString() + "," + file.getSize() + ','
+ imageWidth + ',' + imageHeight);
+ message.setType(Message.TYPE_IMAGE);
mXmppConnectionService.updateMessage(message);
}