mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 16:17:44 +00:00
skip early on empty hint labels
This commit is contained in:
parent
5eff3b992b
commit
8b36ff1c54
1 changed files with 3 additions and 3 deletions
|
@ -72,10 +72,10 @@ fun getHintLabel(popupSet: PopupSet<*>?, params: KeyboardParams, label: String):
|
|||
}
|
||||
if (hintLabel != null) break
|
||||
}
|
||||
if (hintLabel in toolbarKeyStrings.values)
|
||||
hintLabel = null // better show nothing instead of the toolbar key label
|
||||
if (hintLabel in toolbarKeyStrings.values || hintLabel.isNullOrEmpty())
|
||||
return null // better show nothing instead of the toolbar key label
|
||||
|
||||
return hintLabel?.let { KeySpecParser.getLabel(transformLabel(it, params)) }
|
||||
return KeySpecParser.getLabel(transformLabel(hintLabel!!, params))
|
||||
// avoid e.g. !autoColumnOrder! as label
|
||||
// this will avoid having labels on comma and period keys
|
||||
?.takeIf { !it.startsWith("!") || it.count { it == '!' } != 2 } // excluding the special labels
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue