Enable encryption only when key available

pull/209/head
M66B 2 years ago
parent 292bfd7a63
commit c1bbda3158

@ -5120,15 +5120,13 @@ public class FragmentCompose extends FragmentBase {
EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt)) { EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (Helper.isOpenKeychainInstalled(context) && if (Helper.isOpenKeychainInstalled(context) &&
selected.sign_key != null && selected.sign_key != null &&
(EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt) || PgpHelper.hasPgpKey(context, recipients))
PgpHelper.hasPgpKey(context, recipients)))
data.draft.ui_encrypt = ref.ui_encrypt; data.draft.ui_encrypt = ref.ui_encrypt;
} else if (EntityMessage.SMIME_SIGNONLY.equals(ref.ui_encrypt) || } else if (EntityMessage.SMIME_SIGNONLY.equals(ref.ui_encrypt) ||
EntityMessage.SMIME_SIGNENCRYPT.equals(ref.ui_encrypt)) { EntityMessage.SMIME_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (ActivityBilling.isPro(context) && if (ActivityBilling.isPro(context) &&
selected.sign_key_alias != null && selected.sign_key_alias != null &&
(EntityMessage.SMIME_SIGNENCRYPT.equals(ref.ui_encrypt) || SmimeHelper.hasSmimeKey(context, recipients))
SmimeHelper.hasSmimeKey(context, recipients)))
data.draft.ui_encrypt = ref.ui_encrypt; data.draft.ui_encrypt = ref.ui_encrypt;
} }
} }

Loading…
Cancel
Save