Check for any/all PGP or S/MIME keys

This commit is contained in:
M66B
2022-10-30 07:39:56 +01:00
parent 09cc268690
commit 388be88d0f
4 changed files with 14 additions and 13 deletions

View File

@@ -5137,13 +5137,13 @@ public class FragmentCompose extends FragmentBase {
EntityMessage.PGP_SIGNENCRYPT.equals(ref.ui_encrypt)) {
if (Helper.isOpenKeychainInstalled(context) &&
selected.sign_key != null &&
PgpHelper.hasPgpKey(context, recipients))
PgpHelper.hasPgpKey(context, recipients, true))
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 &&
SmimeHelper.hasSmimeKey(context, recipients))
SmimeHelper.hasSmimeKey(context, recipients, true))
data.draft.ui_encrypt = ref.ui_encrypt;
}
}
@@ -6400,8 +6400,8 @@ public class FragmentCompose extends FragmentBase {
EntityMessage.DSN_NONE.equals(draft.dsn)) &&
(draft.ui_encrypt == null ||
EntityMessage.ENCRYPT_NONE.equals(draft.ui_encrypt))) {
args.putBoolean("remind_pgp", PgpHelper.hasPgpKey(context, recipients));
args.putBoolean("remind_smime", SmimeHelper.hasSmimeKey(context, recipients));
args.putBoolean("remind_pgp", PgpHelper.hasPgpKey(context, recipients, false));
args.putBoolean("remind_smime", SmimeHelper.hasSmimeKey(context, recipients, false));
}
if (TextUtils.isEmpty(draft.subject))