mirror of https://github.com/M66B/FairEmail.git
Fixed global sign/encrypt default when changing identity
This commit is contained in:
parent
801a0e8817
commit
67d5cb97e3
|
@ -6689,6 +6689,10 @@ public class FragmentCompose extends FragmentBase {
|
||||||
long id = args.getLong("id");
|
long id = args.getLong("id");
|
||||||
long iid = args.getLong("identity");
|
long iid = args.getLong("identity");
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean sign_default = prefs.getBoolean("sign_default", false);
|
||||||
|
boolean encrypt_default = prefs.getBoolean("encrypt_default", false);
|
||||||
|
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
|
|
||||||
EntityMessage draft = db.message().getMessage(id);
|
EntityMessage draft = db.message().getMessage(id);
|
||||||
|
@ -6699,9 +6703,9 @@ public class FragmentCompose extends FragmentBase {
|
||||||
if (identity == null)
|
if (identity == null)
|
||||||
return draft.ui_encrypt;
|
return draft.ui_encrypt;
|
||||||
|
|
||||||
if (identity.encrypt_default)
|
if (encrypt_default || identity.encrypt_default)
|
||||||
draft.ui_encrypt = EntityMessage.PGP_SIGNENCRYPT;
|
draft.ui_encrypt = EntityMessage.PGP_SIGNENCRYPT;
|
||||||
else if (identity.sign_default)
|
else if (sign_default || identity.sign_default)
|
||||||
draft.ui_encrypt = EntityMessage.PGP_SIGNONLY;
|
draft.ui_encrypt = EntityMessage.PGP_SIGNONLY;
|
||||||
else
|
else
|
||||||
draft.ui_encrypt = null;
|
draft.ui_encrypt = null;
|
||||||
|
|
Loading…
Reference in New Issue