Enable encryption only when key available

This commit is contained in:
M66B 2022-10-13 12:16:00 +02:00
parent 292bfd7a63
commit c1bbda3158
1 changed files with 2 additions and 4 deletions

View File

@ -5120,15 +5120,13 @@ public class FragmentCompose extends FragmentBase {
EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (Helper.isOpenKeychainInstalled(context) &&
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;
} else if (EntityMessage.SMIME_SIGNONLY.equals(ref.ui_encrypt) ||
EntityMessage.SMIME_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (ActivityBilling.isPro(context) &&
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;
}
}