|
|
|
@ -70,6 +70,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
private TextView tvFtsPro;
|
|
|
|
|
private SwitchCompat swEnglish;
|
|
|
|
|
private SwitchCompat swWatchdog;
|
|
|
|
|
private SwitchCompat swSasl;
|
|
|
|
|
private SwitchCompat swOptimize;
|
|
|
|
|
private SwitchCompat swUpdates;
|
|
|
|
|
private SwitchCompat swExperiments;
|
|
|
|
@ -93,7 +94,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
private Group grpDebug;
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"shortcuts", "fts", "english", "watchdog", "auto_optimize", "updates",
|
|
|
|
|
"shortcuts", "fts", "english", "watchdog", "sasl", "auto_optimize", "updates",
|
|
|
|
|
"experiments", "crash_reports", "debug", "cleanup_attachments"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -124,6 +125,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
tvFtsPro = view.findViewById(R.id.tvFtsPro);
|
|
|
|
|
swEnglish = view.findViewById(R.id.swEnglish);
|
|
|
|
|
swWatchdog = view.findViewById(R.id.swWatchdog);
|
|
|
|
|
swSasl = view.findViewById(R.id.swSasl);
|
|
|
|
|
swOptimize = view.findViewById(R.id.swOptimize);
|
|
|
|
|
swUpdates = view.findViewById(R.id.swUpdates);
|
|
|
|
|
swExperiments = view.findViewById(R.id.swExperiments);
|
|
|
|
@ -223,6 +225,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swSasl.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("sasl", checked).apply();
|
|
|
|
|
ServiceSynchronize.reload(getContext(), -1L, false, "sasl=" + checked);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swOptimize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
@ -508,6 +518,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
swFts.setChecked(prefs.getBoolean("fts", false));
|
|
|
|
|
swEnglish.setChecked(prefs.getBoolean("english", false));
|
|
|
|
|
swWatchdog.setChecked(prefs.getBoolean("watchdog", true));
|
|
|
|
|
swSasl.setChecked(prefs.getBoolean("sasl", true));
|
|
|
|
|
swOptimize.setChecked(prefs.getBoolean("auto_optimize", false));
|
|
|
|
|
swUpdates.setChecked(prefs.getBoolean("updates", true));
|
|
|
|
|
swUpdates.setVisibility(
|
|
|
|
|