From 0bfd7d7ca46a60d1a7c9f10209f895122a385b59 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 1 Dec 2019 18:27:44 +0100 Subject: [PATCH] Compose sign icon --- .../java/eu/faircode/email/FragmentCompose.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index c4031fd19c..ce76412d9f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -931,10 +931,16 @@ public class FragmentCompose extends FragmentBase { int colorEncrypt = Helper.resolveColor(getContext(), R.attr.colorEncrypt); ImageButton ib = (ImageButton) menu.findItem(R.id.menu_encrypt).getActionView(); ib.setEnabled(!busy); - ib.setImageResource(EntityMessage.PGP_SIGNENCRYPT.equals(encrypt) - ? R.drawable.baseline_lock_24 : R.drawable.baseline_lock_open_24); - ib.setImageTintList(EntityMessage.PGP_SIGNENCRYPT.equals(encrypt) - ? ColorStateList.valueOf(colorEncrypt) : null); + if (EntityMessage.PGP_SIGNONLY.equals(encrypt)) { + ib.setImageResource(R.drawable.baseline_gesture_24); + ib.setImageTintList(null); + } else if (EntityMessage.PGP_SIGNENCRYPT.equals(encrypt)) { + ib.setImageResource(R.drawable.baseline_lock_24); + ib.setImageTintList(ColorStateList.valueOf(colorEncrypt)); + } else { + ib.setImageResource(R.drawable.baseline_lock_open_24); + ib.setImageTintList(null); + } menu.findItem(R.id.menu_media).setChecked(media); menu.findItem(R.id.menu_compact).setChecked(compact);