diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-08 20:09:44 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-08 20:09:44 +0200 |
commit | b23f8bd472f5c6bc809dddd26dd69791c9ed7dd8 (patch) | |
tree | 70a97b915395bc95f7e65f19bfdc033291d5d91f /src/eu/siacs/conversations/ui/adapter/MessageAdapter.java | |
parent | a6f0f0cb6e7d8853ba0f30d3aee5c2842304f451 (diff) |
introduced downloadable interface. reverted some of the changes made to OTR
Diffstat (limited to 'src/eu/siacs/conversations/ui/adapter/MessageAdapter.java')
-rw-r--r-- | src/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 074e38fb..1abd208d 100644 --- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -7,6 +7,7 @@ import eu.siacs.conversations.Config; import eu.siacs.conversations.R; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Downloadable; import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.ui.ConversationActivity; import eu.siacs.conversations.utils.UIHelper; @@ -461,10 +462,9 @@ public class MessageAdapter extends ArrayAdapter<Message> { @Override public void onClick(View v) { - JingleConnection connection = item - .getJingleConnection(); - if (connection != null) { - connection.accept(); + Downloadable downloadable = item.getDownloadable(); + if (downloadable != null) { + downloadable.start(); } } }); @@ -495,11 +495,6 @@ public class MessageAdapter extends ArrayAdapter<Message> { } } else if (item.getEncryption() == Message.ENCRYPTION_DECRYPTION_FAILED) { displayDecryptionFailed(viewHolder); - } else if (item.getEncryption() == Message.ENCRYPTION_OTR - && item.getStatus() == Message.STATUS_RECEPTION_FAILED - && item.getType() == Message.TYPE_TEXT) { - displayInfoMessage(viewHolder, - R.string.unable_to_decrypt_otr_message); } else { displayTextMessage(viewHolder, item); } |