diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-12-18 22:22:40 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-12-18 22:22:40 +0100 |
commit | 748160347281c48e1a70d4d65ba13fc866fab927 (patch) | |
tree | fd9d86b182a440f4e91e5b195ea34284f99b0ebc /src/main/java/de | |
parent | d1af87e398066675c0b9d4ed39950b19f5f13d3d (diff) |
use verified symbol instead of colored lock icons
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index 8014ac861..578a2c684 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -218,30 +218,20 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie if (message.getEncryption() == Message.ENCRYPTION_NONE) { viewHolder.indicator.setVisibility(View.GONE); } else { - viewHolder.indicator.setVisibility(View.VISIBLE); + boolean verified = false; if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) { - FingerprintStatus status = message.getConversation() + final FingerprintStatus status = message.getConversation() .getAccount().getAxolotlService().getFingerprintTrust( message.getFingerprint()); - if(status == null || (type == SENT ? !status.isTrusted() : (!status.isVerified() && inValidSession))) { - viewHolder.indicator.setColorFilter(0xffc64545); - viewHolder.indicator.setAlpha(1.0f); - } else { - viewHolder.indicator.clearColorFilter(); - if (darkBackground) { - viewHolder.indicator.setAlpha(0.7f); - } else { - viewHolder.indicator.setAlpha(0.57f); - } + if (status != null && status.isVerified()) { + verified = true; } + } + if (verified) { + viewHolder.indicator.setImageResource(R.drawable.ic_verified_user_blue_18dp); } else { - viewHolder.indicator.clearColorFilter(); - if (darkBackground) { - viewHolder.indicator.setAlpha(0.7f); - } else { - viewHolder.indicator.setAlpha(0.57f); - } + viewHolder.indicator.setImageResource(R.drawable.ic_lock_blue_18dp); } } |