aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/adapter
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-28 22:40:09 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-10-28 22:40:09 +0100
commita7fd629c051a3ba0031fba4e358ba4f3b843283d (patch)
treef0db50f70b0504c72b92dc44eab38346124940d4 /src/main/java/eu/siacs/conversations/ui/adapter
parentec473a4437b3bff88e80404b7012ae15d3c09c3d (diff)
show encryption type in warned/red messages
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/adapter')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index d9fea8170..42c68eb8b 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -36,6 +36,7 @@ import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.Message.FileParams;
import eu.siacs.conversations.entities.Transferable;
import eu.siacs.conversations.ui.ConversationActivity;
+import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.GeoHelper;
import eu.siacs.conversations.utils.UIHelper;
@@ -462,6 +463,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
.findViewById(R.id.message_time);
viewHolder.indicatorReceived = (ImageView) view
.findViewById(R.id.indicator_received);
+ viewHolder.encryption = (TextView) view.findViewById(R.id.message_encryption);
break;
case STATUS:
view = activity.getLayoutInflater().inflate(R.layout.message_status, parent, false);
@@ -585,8 +587,11 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} else {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received);
}
+ viewHolder.encryption.setVisibility(View.GONE);
} else {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning);
+ viewHolder.encryption.setVisibility(View.VISIBLE);
+ viewHolder.encryption.setText(CryptoHelper.encryptionTypeToText(message.getEncryption()));
}
}
@@ -667,5 +672,6 @@ public class MessageAdapter extends ArrayAdapter<Message> {
protected TextView messageBody;
protected ImageView contact_picture;
protected TextView status_message;
+ protected TextView encryption;
}
}