Option to always show word to be enterd as middle suggestion (#739)

Co-authored-by: codokie <@>
Co-authored-by: Volterxien <volerxien.github@jacbo.me>
This commit is contained in:
Volterxien 2024-05-01 00:33:57 -04:00 committed by GitHub
parent 26a5934e2f
commit e0c5da380e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 4 deletions

View file

@ -87,6 +87,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
public static final String PREF_AUTO_CORRECTION = "auto_correction";
public static final String PREF_MORE_AUTO_CORRECTION = "more_auto_correction";
public static final String PREF_AUTO_CORRECTION_CONFIDENCE = "auto_correction_confidence";
public static final String PREF_CENTER_SUGGESTION_TEXT_TO_ENTER = "center_suggestion_text_to_enter";
public static final String PREF_SHOW_SUGGESTIONS = "show_suggestions";
public static final String PREF_ALWAYS_SHOW_SUGGESTIONS = "always_show_suggestions";
public static final String PREF_KEY_USE_PERSONALIZED_DICTS = "use_personalized_dicts";
@ -287,6 +288,10 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
res.getString(R.string.auto_correction_threshold_mode_index_modest));
}
public static boolean readCenterSuggestionTextToEnter(final SharedPreferences prefs, final Resources res) {
return prefs.getBoolean(PREF_CENTER_SUGGESTION_TEXT_TO_ENTER, res.getBoolean(R.bool.config_center_suggestion_text_to_enter));
}
public static boolean readBlockPotentiallyOffensive(final SharedPreferences prefs, final Resources res) {
return prefs.getBoolean(PREF_BLOCK_POTENTIALLY_OFFENSIVE,
res.getBoolean(R.bool.config_block_potentially_offensive));