mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Added auto verify signatures
This commit is contained in:
@@ -87,6 +87,7 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||
private SwitchCompat swSign;
|
||||
private SwitchCompat swEncrypt;
|
||||
private SwitchCompat swEncryptAuto;
|
||||
private SwitchCompat swAutoVerify;
|
||||
private SwitchCompat swAutoDecrypt;
|
||||
private SwitchCompat swAutoUndoDecrypt;
|
||||
private Button btnReset;
|
||||
@@ -118,7 +119,7 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"sign_default", "encrypt_default", "encrypt_auto",
|
||||
"auto_decrypt", "auto_undecrypt",
|
||||
"auto_verify", "auto_decrypt", "auto_undecrypt",
|
||||
"openpgp_provider", "autocrypt", "autocrypt_mutual", "encrypt_subject",
|
||||
"sign_algo_smime", "encrypt_algo_smime", "check_certificate"
|
||||
};
|
||||
@@ -139,6 +140,7 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||
swSign = view.findViewById(R.id.swSign);
|
||||
swEncrypt = view.findViewById(R.id.swEncrypt);
|
||||
swEncryptAuto = view.findViewById(R.id.swEncryptAuto);
|
||||
swAutoVerify = view.findViewById(R.id.swAutoVerify);
|
||||
swAutoDecrypt = view.findViewById(R.id.swAutoDecrypt);
|
||||
swAutoUndoDecrypt = view.findViewById(R.id.swAutoUndoDecrypt);
|
||||
btnReset = view.findViewById(R.id.btnReset);
|
||||
@@ -225,6 +227,13 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||
}
|
||||
});
|
||||
|
||||
swAutoVerify.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("auto_verify", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swAutoDecrypt.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -644,6 +653,7 @@ public class FragmentOptionsEncryption extends FragmentBase
|
||||
swEncrypt.setChecked(prefs.getBoolean("encrypt_default", false));
|
||||
swSign.setEnabled(!swEncrypt.isChecked());
|
||||
swEncryptAuto.setChecked(prefs.getBoolean("encrypt_auto", false));
|
||||
swAutoVerify.setChecked(prefs.getBoolean("auto_verify", false));
|
||||
swAutoDecrypt.setChecked(prefs.getBoolean("auto_decrypt", false));
|
||||
swAutoUndoDecrypt.setChecked(prefs.getBoolean("auto_undecrypt", false));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user