aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-08 20:09:44 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-08 20:09:44 +0200
commitb23f8bd472f5c6bc809dddd26dd69791c9ed7dd8 (patch)
tree70a97b915395bc95f7e65f19bfdc033291d5d91f /src/eu/siacs/conversations/ui
parenta6f0f0cb6e7d8853ba0f30d3aee5c2842304f451 (diff)
introduced downloadable interface. reverted some of the changes made to OTR
Diffstat (limited to 'src/eu/siacs/conversations/ui')
-rw-r--r--src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java5
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java13
2 files changed, 5 insertions, 13 deletions
diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
index 648c6620..bfcba135 100644
--- a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -62,10 +62,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
if (latestMessage.getType() == Message.TYPE_TEXT
|| latestMessage.getType() == Message.TYPE_PRIVATE) {
- if (latestMessage.getEncryption() == Message.ENCRYPTION_OTR
- && latestMessage.getStatus() == Message.STATUS_RECEPTION_FAILED) {
- convLastMsg.setText(R.string.unable_to_decrypt_otr_message);
- } else if ((latestMessage.getEncryption() != Message.ENCRYPTION_PGP)
+ if ((latestMessage.getEncryption() != Message.ENCRYPTION_PGP)
&& (latestMessage.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED)) {
String body = Config.PARSE_EMOTICONS ? UIHelper
.transformAsciiEmoticons(latestMessage.getBody())
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);
}