allow enabling popups on keypress on tablets

still disabled by default, because the popups are too small (size should not be in dp, but in % of screen width or something like that)
fixes #799
This commit is contained in:
Helium314 2024-05-19 15:26:57 +02:00
parent 77f03b0756
commit f81e24d550
7 changed files with 2 additions and 17 deletions

View file

@ -303,16 +303,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
return JniUtils.sHaveGestureLib && prefs.getBoolean(PREF_GESTURE_INPUT, true);
}
public static boolean readFromBuildConfigIfToShowKeyPreviewPopupOption(final Resources res) {
return res.getBoolean(R.bool.config_enable_show_key_preview_popup_option);
}
public static boolean readKeyPreviewPopupEnabled(final SharedPreferences prefs, final Resources res) {
final boolean defaultKeyPreviewPopup = res.getBoolean(
R.bool.config_default_key_preview_popup);
if (!readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
return defaultKeyPreviewPopup;
}
final boolean defaultKeyPreviewPopup = res.getBoolean(R.bool.config_default_key_preview_popup);
return prefs.getBoolean(PREF_POPUP_ON, defaultKeyPreviewPopup);
}