|
|
|
@ -122,6 +122,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
private TextView tvFtsPro;
|
|
|
|
|
private Spinner spLanguage;
|
|
|
|
|
private SwitchCompat swLanguageTool;
|
|
|
|
|
private SwitchCompat swLanguageToolPicky;
|
|
|
|
|
private TextView tvLanguageToolPrivacy;
|
|
|
|
|
private ImageButton ibLanguageTool;
|
|
|
|
|
private SwitchCompat swDeepL;
|
|
|
|
@ -241,7 +242,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"sort_answers", "shortcuts", "fts",
|
|
|
|
|
"classification", "class_min_probability", "class_min_difference",
|
|
|
|
|
"language", "lt_enabled", "deepl_enabled", "vt_enabled", "vt_apikey", "send_enabled", "send_host",
|
|
|
|
|
"language", "lt_enabled", "lt_picky", "deepl_enabled", "vt_enabled", "vt_apikey", "send_enabled", "send_host",
|
|
|
|
|
"updates", "weekly", "show_changelog",
|
|
|
|
|
"crash_reports", "cleanup_attachments",
|
|
|
|
|
"watchdog", "experiments", "main_log", "main_log_memory", "protocol", "log_level", "debug", "leak_canary",
|
|
|
|
@ -326,6 +327,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
tvFtsPro = view.findViewById(R.id.tvFtsPro);
|
|
|
|
|
spLanguage = view.findViewById(R.id.spLanguage);
|
|
|
|
|
swLanguageTool = view.findViewById(R.id.swLanguageTool);
|
|
|
|
|
swLanguageToolPicky = view.findViewById(R.id.swLanguageToolPicky);
|
|
|
|
|
tvLanguageToolPrivacy = view.findViewById(R.id.tvLanguageToolPrivacy);
|
|
|
|
|
ibLanguageTool = view.findViewById(R.id.ibLanguageTool);
|
|
|
|
|
swDeepL = view.findViewById(R.id.swDeepL);
|
|
|
|
@ -633,6 +635,14 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("lt_enabled", checked).apply();
|
|
|
|
|
swLanguageToolPicky.setEnabled(checked);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swLanguageToolPicky.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("lt_picky", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -1996,6 +2006,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
spLanguage.setSelection(selected);
|
|
|
|
|
|
|
|
|
|
swLanguageTool.setChecked(prefs.getBoolean("lt_enabled", false));
|
|
|
|
|
swLanguageToolPicky.setChecked(prefs.getBoolean("lt_picky", false));
|
|
|
|
|
swLanguageToolPicky.setEnabled(swLanguageTool.isChecked());
|
|
|
|
|
swDeepL.setChecked(prefs.getBoolean("deepl_enabled", false));
|
|
|
|
|
swVirusTotal.setChecked(prefs.getBoolean("vt_enabled", false));
|
|
|
|
|
etVirusTotal.setText(prefs.getString("vt_apikey", null));
|
|
|
|
|