Conditionally reply signed/encrypted

This commit is contained in:
M66B 2020-07-11 07:55:08 +02:00
parent 4551342937
commit d2144403be
1 changed files with 8 additions and 6 deletions

View File

@ -3418,11 +3418,13 @@ public class FragmentCompose extends FragmentBase {
data.draft.plain_only = true;
// Encryption
if (ref.ui_encrypt != null && !EntityMessage.ENCRYPT_NONE.equals(ref.ui_encrypt)) {
if (ActivityBilling.isPro(context))
if (Helper.isOpenKeychainInstalled(context) ||
EntityMessage.SMIME_SIGNONLY.equals(ref.encrypt) ||
EntityMessage.SMIME_SIGNENCRYPT.equals(ref.encrypt))
if (EntityMessage.PGP_SIGNONLY.equals(ref.ui_encrypt) ||
EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (Helper.isOpenKeychainInstalled(context) && selected.sign_key != null)
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)
data.draft.ui_encrypt = ref.ui_encrypt;
}