mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 08:07:42 +00:00
Add comma to the repurposed comma key's popup in URL and email mode (#1594)
This commit is contained in:
parent
e034065236
commit
e25300d832
1 changed files with 8 additions and 5 deletions
|
@ -132,6 +132,9 @@ sealed interface KeyData : AbstractKeyData {
|
|||
keys.add("!icon/start_onehanded_mode_key|!code/key_toggle_onehanded")
|
||||
if (!params.mId.mDeviceLocked)
|
||||
keys.add("!icon/settings_key|!code/key_settings")
|
||||
if (shouldShowTldPopups(params)) {
|
||||
keys.add(",")
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
|
@ -315,6 +318,11 @@ sealed interface KeyData : AbstractKeyData {
|
|||
}
|
||||
}
|
||||
|
||||
private fun shouldShowTldPopups(params: KeyboardParams): Boolean =
|
||||
(Settings.getInstance().current.mShowTldPopupKeys
|
||||
&& params.mId.mSubtype.layouts[LayoutType.FUNCTIONAL] != "functional_keys_tablet"
|
||||
&& params.mId.mMode in setOf(KeyboardId.MODE_URL, KeyboardId.MODE_EMAIL))
|
||||
|
||||
// could make arrays right away, but they need to be copied anyway as popupKeys arrays are modified when creating KeyParams
|
||||
private const val POPUP_EYS_NAVIGATE_PREVIOUS = "!icon/previous_key|!code/key_action_previous,!icon/clipboard_action_key|!code/key_clipboard"
|
||||
private const val POPUP_EYS_NAVIGATE_NEXT = "!icon/clipboard_action_key|!code/key_clipboard,!icon/next_key|!code/key_action_next"
|
||||
|
@ -583,11 +591,6 @@ sealed interface KeyData : AbstractKeyData {
|
|||
if (shouldShowTldPopups(params)) params.mLocaleKeyboardInfos.tlds
|
||||
else getPunctuationPopupKeys(params)
|
||||
)
|
||||
|
||||
private fun shouldShowTldPopups(params: KeyboardParams): Boolean =
|
||||
(Settings.getInstance().current.mShowTldPopupKeys
|
||||
&& params.mId.mSubtype.layouts[LayoutType.FUNCTIONAL] != "functional_keys_tablet"
|
||||
&& params.mId.mMode in setOf(KeyboardId.MODE_URL, KeyboardId.MODE_EMAIL))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue