Added tld flags debug option

This commit is contained in:
M66B
2023-07-10 17:08:20 +02:00
parent 91beda4464
commit 4253164b54
4 changed files with 28 additions and 10 deletions

View File

@@ -236,6 +236,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swNativeArc;
private EditText etNativeArcWhitelist;
private SwitchCompat swInfra;
private SwitchCompat swTldFlags;
private SwitchCompat swDupMsgId;
private SwitchCompat swThreadByRef;
private EditText etKeywords;
@@ -300,7 +301,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
"max_backoff_power", "logarithmic_backoff",
"exact_alarms",
"native_dkim", "native_arc", "native_arc_whitelist",
"infra", "dup_msgids", "thread_byref", "global_keywords", "test_iab"
"infra", "tld_flags", "dup_msgids", "thread_byref", "global_keywords", "test_iab"
};
private final static String[] RESET_QUESTIONS = new String[]{
@@ -484,6 +485,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swNativeArc = view.findViewById(R.id.swNativeArc);
etNativeArcWhitelist = view.findViewById(R.id.etNativeArcWhitelist);
swInfra = view.findViewById(R.id.swInfra);
swTldFlags = view.findViewById(R.id.swTldFlags);
swDupMsgId = view.findViewById(R.id.swDupMsgId);
swThreadByRef = view.findViewById(R.id.swThreadByRef);
etKeywords = view.findViewById(R.id.etKeywords);
@@ -1824,6 +1826,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
swTldFlags.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("tld_flags", checked).apply();
}
});
swDupMsgId.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -2580,6 +2589,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
etNativeArcWhitelist.setEnabled(swNativeDkim.isEnabled() && swNativeDkim.isChecked());
etNativeArcWhitelist.setText(prefs.getString("native_arc_whitelist", null));
swInfra.setChecked(prefs.getBoolean("infra", false));
swTldFlags.setChecked(prefs.getBoolean("tld_flags", false));
swDupMsgId.setChecked(prefs.getBoolean("dup_msgids", false));
swThreadByRef.setChecked(prefs.getBoolean("thread_byref", true));
etKeywords.setText(prefs.getString("global_keywords", null));