From 9c727f342d8db72481a6821d1b563dba3c676887 Mon Sep 17 00:00:00 2001 From: Eran Leshem <1707552+eranl@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:19:26 +0300 Subject: [PATCH] Remove TLD popup hint (#1511) Co-authored-by: Helium314 --- .../main/assets/layouts/functional/functional_keys.json | 2 +- .../internal/keyboard_parser/floris/TextKeyData.kt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/assets/layouts/functional/functional_keys.json b/app/src/main/assets/layouts/functional/functional_keys.json index 788e44796..6d28dd24f 100644 --- a/app/src/main/assets/layouts/functional/functional_keys.json +++ b/app/src/main/assets/layouts/functional/functional_keys.json @@ -15,7 +15,7 @@ { "$": "keyboard_state_selector", "emojiKeyEnabled": { "$": "keyboard_state_selector", "alphabet": { "label": "emoji" }}}, { "$": "keyboard_state_selector", "symbols": { "label": "numpad" }}, { "label": "space" }, - { "label": "period" }, + { "label": "period", "labelFlags": 1073741824 }, { "label": "action", "width": 0.15 } ] ] diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/TextKeyData.kt b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/TextKeyData.kt index 757ea9a5a..ae4eacdc4 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/TextKeyData.kt +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/TextKeyData.kt @@ -526,11 +526,8 @@ sealed interface KeyData : AbstractKeyData { return when (label) { KeyLabel.ALPHA, KeyLabel.SYMBOL_ALPHA, KeyLabel.SYMBOL -> Key.LABEL_FLAGS_PRESERVE_CASE or Key.LABEL_FLAGS_FOLLOW_FUNCTIONAL_TEXT_COLOR KeyLabel.COMMA -> Key.LABEL_FLAGS_HAS_POPUP_HINT - // essentially the first term only changes the appearance of the armenian period key in holo theme - KeyLabel.PERIOD -> (Key.LABEL_FLAGS_HAS_POPUP_HINT and - if (params.mId.isAlphabetKeyboard) params.mLocaleKeyboardInfos.labelFlags else 0) or - (if (shouldShowTldPopups(params)) 0 else Key.LABEL_FLAGS_DISABLE_HINT_LABEL) or - Key.LABEL_FLAGS_PRESERVE_CASE + // essentially this only changes the appearance of the armenian period key in holo theme + KeyLabel.PERIOD -> Key.LABEL_FLAGS_HAS_POPUP_HINT and if (params.mId.isAlphabetKeyboard) params.mLocaleKeyboardInfos.labelFlags else 0 KeyLabel.ACTION -> { Key.LABEL_FLAGS_PRESERVE_CASE or Key.LABEL_FLAGS_AUTO_X_SCALE or Key.LABEL_FLAGS_FOLLOW_KEY_LABEL_RATIO or Key.LABEL_FLAGS_FOLLOW_FUNCTIONAL_TEXT_COLOR or