aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-07 13:25:27 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-07 13:25:27 +0200
commitea8f3a26758ef4e65b3a41d1241fadba626b83e9 (patch)
tree8f222332e1d6ace1cc7bb68c780fe65dd503b41b /src/eu/siacs/conversations/services/XmppConnectionService.java
parentdf7f7c5c4e133d7b055a3c146e1c8bc577178939 (diff)
possible fix to be able to images and encrypted messages at a faster rate
Diffstat (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 81ac77c2a..1d59692c8 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -356,7 +356,7 @@ public class XmppConnectionService extends Service {
}
public Message attachImageToConversation(final Conversation conversation,
- final Uri uri, final UiCallback callback) {
+ final Uri uri, final UiCallback<Message> callback) {
final Message message;
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "",
@@ -376,10 +376,11 @@ public class XmppConnectionService extends Service {
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
getPgpEngine().encrypt(message, callback);
} else {
- callback.success();
+ message.ready = true;
+ callback.success(message);
}
} catch (FileBackend.ImageCopyException e) {
- callback.error(e.getResId());
+ callback.error(e.getResId(),message);
}
}
}).start();