mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
LT description popup
This commit is contained in:
@@ -148,6 +148,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private SwitchCompat swLanguageToolAuto;
|
||||
private SwitchCompat swLanguageToolPicky;
|
||||
private SwitchCompat swLanguageToolHighlight;
|
||||
private SwitchCompat swLanguageToolDescription;
|
||||
private EditText etLanguageTool;
|
||||
private EditText etLanguageToolUser;
|
||||
private TextInputLayout tilLanguageToolKey;
|
||||
@@ -287,7 +288,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
"classification", "class_min_probability", "class_min_difference",
|
||||
"show_filtered",
|
||||
"language",
|
||||
"lt_enabled", "lt_sentence", "lt_auto", "lt_picky", "lt_highlight", "lt_uri", "lt_user", "lt_key",
|
||||
"lt_enabled", "lt_sentence", "lt_auto", "lt_picky", "lt_highlight", "lt_description", "lt_uri", "lt_user", "lt_key",
|
||||
"deepl_enabled",
|
||||
"vt_enabled", "vt_apikey",
|
||||
"send_enabled", "send_host", "send_dlimit", "send_tlimit",
|
||||
@@ -405,6 +406,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swLanguageToolAuto = view.findViewById(R.id.swLanguageToolAuto);
|
||||
swLanguageToolPicky = view.findViewById(R.id.swLanguageToolPicky);
|
||||
swLanguageToolHighlight = view.findViewById(R.id.swLanguageToolHighlight);
|
||||
swLanguageToolDescription = view.findViewById(R.id.swLanguageToolDescription);
|
||||
etLanguageTool = view.findViewById(R.id.etLanguageTool);
|
||||
etLanguageToolUser = view.findViewById(R.id.etLanguageToolUser);
|
||||
tilLanguageToolKey = view.findViewById(R.id.tilLanguageToolKey);
|
||||
@@ -866,6 +868,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swLanguageToolAuto.setEnabled(checked);
|
||||
swLanguageToolPicky.setEnabled(checked);
|
||||
swLanguageToolHighlight.setEnabled(checked);
|
||||
swLanguageToolDescription.setEnabled(checked);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -905,6 +908,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
}
|
||||
});
|
||||
|
||||
swLanguageToolDescription.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("lt_description", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
etLanguageTool.setHint(LanguageTool.LT_URI);
|
||||
etLanguageTool.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
@@ -2574,6 +2584,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
swLanguageToolPicky.setEnabled(swLanguageTool.isChecked());
|
||||
swLanguageToolHighlight.setChecked(prefs.getBoolean("lt_highlight", !BuildConfig.PLAY_STORE_RELEASE));
|
||||
swLanguageToolHighlight.setEnabled(swLanguageTool.isChecked());
|
||||
swLanguageToolDescription.setChecked(prefs.getBoolean("lt_description", false));
|
||||
swLanguageToolDescription.setEnabled(swLanguageTool.isChecked());
|
||||
etLanguageTool.setText(prefs.getString("lt_uri", null));
|
||||
etLanguageToolUser.setText(prefs.getString("lt_user", null));
|
||||
tilLanguageToolKey.getEditText().setText(prefs.getString("lt_key", null));
|
||||
|
||||
Reference in New Issue
Block a user