1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-28 08:46:01 +00:00

Enable auto decrypt for S/MIME

This commit is contained in:
M66B 2019-12-06 13:38:52 +01:00
parent 2e5f28bf8b
commit 7a74ce6448
2 changed files with 7 additions and 1 deletions

View file

@ -1580,7 +1580,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean auto_decrypt = prefs.getBoolean("auto_decrypt", false); boolean auto_decrypt = prefs.getBoolean("auto_decrypt", false);
if (auto_decrypt && EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt)) if (auto_decrypt &&
(EntityMessage.PGP_SIGNENCRYPT.equals(message.encrypt) ||
EntityMessage.SMIME_SIGNENCRYPT.equals(message.encrypt)))
onActionDecrypt(message, true); onActionDecrypt(message, true);
// Show images // Show images

View file

@ -3928,6 +3928,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override @Override
protected void onExecuted(Bundle args, EntityIdentity identity) { protected void onExecuted(Bundle args, EntityIdentity identity) {
Boolean auto = args.getBoolean("auto");
if (auto && identity == null)
return;
Helper.selectKeyAlias(getActivity(), identity == null ? null : identity.sign_key_alias, new Helper.IKeyAlias() { Helper.selectKeyAlias(getActivity(), identity == null ? null : identity.sign_key_alias, new Helper.IKeyAlias() {
@Override @Override
public void onSelected(String alias) { public void onSelected(String alias) {