1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Padlock disable state

This commit is contained in:
M66B 2020-11-13 18:05:30 +01:00
parent 40bd3299a1
commit b1825316c3

View file

@ -1370,10 +1370,14 @@ public class FragmentCompose extends FragmentBase {
menu.findItem(R.id.menu_clear).setEnabled(state == State.LOADED);
int colorEncrypt = Helper.resolveColor(getContext(), R.attr.colorEncrypt);
View v = menu.findItem(R.id.menu_encrypt).getActionView();
ImageButton ib = v.findViewById(R.id.button);
TextView tv = v.findViewById(R.id.text);
v.setAlpha(state == State.LOADED ? 1f : Helper.LOW_LIGHT);
ib.setEnabled(state == State.LOADED);
if (EntityMessage.PGP_SIGNONLY.equals(encrypt) || EntityMessage.SMIME_SIGNONLY.equals(encrypt)) {
ib.setImageResource(R.drawable.twotone_gesture_24);
ib.setImageTintList(null);