mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Added auth disable debug options
This commit is contained in:
@@ -80,6 +80,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private SwitchCompat swCrashReports;
|
||||
private TextView tvUuid;
|
||||
private SwitchCompat swDebug;
|
||||
private SwitchCompat swAuthPlain;
|
||||
private SwitchCompat swAuthLogin;
|
||||
private SwitchCompat swAuthSasl;
|
||||
private Button btnReset;
|
||||
private SwitchCompat swCleanupAttachments;
|
||||
@@ -99,7 +101,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"shortcuts", "fts", "english", "watchdog", "updates",
|
||||
"experiments", "query_threads", "crash_reports", "debug", "auth_sasl", "cleanup_attachments"
|
||||
"experiments", "query_threads", "crash_reports",
|
||||
"debug", "auth_plain", "auth_login", "auth_sasl", "cleanup_attachments"
|
||||
};
|
||||
|
||||
private final static String[] RESET_QUESTIONS = new String[]{
|
||||
@@ -136,6 +139,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swCrashReports = view.findViewById(R.id.swCrashReports);
|
||||
tvUuid = view.findViewById(R.id.tvUuid);
|
||||
swDebug = view.findViewById(R.id.swDebug);
|
||||
swAuthPlain = view.findViewById(R.id.swAuthPlain);
|
||||
swAuthLogin = view.findViewById(R.id.swAuthLogin);
|
||||
swAuthSasl = view.findViewById(R.id.swAuthSasl);
|
||||
btnReset = view.findViewById(R.id.btnReset);
|
||||
swCleanupAttachments = view.findViewById(R.id.swCleanupAttachments);
|
||||
@@ -292,6 +297,22 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swAuthPlain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("auth_plain", checked).apply();
|
||||
ServiceSynchronize.reload(getContext(), -1L, false, "auth_plain=" + checked);
|
||||
}
|
||||
});
|
||||
|
||||
swAuthLogin.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("auth_login", checked).apply();
|
||||
ServiceSynchronize.reload(getContext(), -1L, false, "auth_login=" + checked);
|
||||
}
|
||||
});
|
||||
|
||||
swAuthSasl.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -554,6 +575,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swCrashReports.setChecked(prefs.getBoolean("crash_reports", false));
|
||||
tvUuid.setText(prefs.getString("uuid", null));
|
||||
swDebug.setChecked(prefs.getBoolean("debug", false));
|
||||
swAuthPlain.setChecked(prefs.getBoolean("auth_plain", true));
|
||||
swAuthLogin.setChecked(prefs.getBoolean("auth_login", true));
|
||||
swAuthSasl.setChecked(prefs.getBoolean("auth_sasl", true));
|
||||
swCleanupAttachments.setChecked(prefs.getBoolean("cleanup_attachments", false));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user