diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-06-07 13:25:27 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-06-07 13:25:27 +0200 |
commit | ea8f3a26758ef4e65b3a41d1241fadba626b83e9 (patch) | |
tree | 8f222332e1d6ace1cc7bb68c780fe65dd503b41b /src/eu/siacs/conversations/services | |
parent | df7f7c5c4e133d7b055a3c146e1c8bc577178939 (diff) |
possible fix to be able to images and encrypted messages at a faster rate
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 7 |
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 81ac77c2..1d59692c 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(); |