aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-12-18 22:22:40 +0100
committerChristian Schneppe <christian@pix-art.de>2016-12-18 22:22:40 +0100
commit748160347281c48e1a70d4d65ba13fc866fab927 (patch)
treefd9d86b182a440f4e91e5b195ea34284f99b0ebc /src/main
parentd1af87e398066675c0b9d4ed39950b19f5f13d3d (diff)
use verified symbol instead of colored lock icons
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java26
-rw-r--r--src/main/res/drawable-hdpi/ic_lock_blue_18dp.pngbin646 -> 614 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_verified_user_blue_18dp.pngbin0 -> 641 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_lock_blue_18dp.pngbin401 -> 399 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_verified_user_blue_18dp.pngbin0 -> 424 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_lock_blue_18dp.pngbin872 -> 738 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_verified_user_blue_18dp.pngbin0 -> 931 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_lock_blue_18dp.pngbin1440 -> 1305 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_verified_user_blue_18dp.pngbin0 -> 1060 bytes
9 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);
}
}
diff --git a/src/main/res/drawable-hdpi/ic_lock_blue_18dp.png b/src/main/res/drawable-hdpi/ic_lock_blue_18dp.png
index 587922d98..608fca49d 100644
--- a/src/main/res/drawable-hdpi/ic_lock_blue_18dp.png
+++ b/src/main/res/drawable-hdpi/ic_lock_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_verified_user_blue_18dp.png b/src/main/res/drawable-hdpi/ic_verified_user_blue_18dp.png
new file mode 100644
index 000000000..f178bbb29
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_verified_user_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_lock_blue_18dp.png b/src/main/res/drawable-mdpi/ic_lock_blue_18dp.png
index c17b81385..8e20d2a69 100644
--- a/src/main/res/drawable-mdpi/ic_lock_blue_18dp.png
+++ b/src/main/res/drawable-mdpi/ic_lock_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_verified_user_blue_18dp.png b/src/main/res/drawable-mdpi/ic_verified_user_blue_18dp.png
new file mode 100644
index 000000000..12dc08721
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_verified_user_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_lock_blue_18dp.png b/src/main/res/drawable-xhdpi/ic_lock_blue_18dp.png
index 6e579cbe4..c21610bd8 100644
--- a/src/main/res/drawable-xhdpi/ic_lock_blue_18dp.png
+++ b/src/main/res/drawable-xhdpi/ic_lock_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_verified_user_blue_18dp.png b/src/main/res/drawable-xhdpi/ic_verified_user_blue_18dp.png
new file mode 100644
index 000000000..8a8d4d8f3
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_verified_user_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_lock_blue_18dp.png b/src/main/res/drawable-xxhdpi/ic_lock_blue_18dp.png
index ae8fd44df..9101506fa 100644
--- a/src/main/res/drawable-xxhdpi/ic_lock_blue_18dp.png
+++ b/src/main/res/drawable-xxhdpi/ic_lock_blue_18dp.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_verified_user_blue_18dp.png b/src/main/res/drawable-xxhdpi/ic_verified_user_blue_18dp.png
new file mode 100644
index 000000000..ecb5abc41
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_verified_user_blue_18dp.png
Binary files differ