Skip keyspec shortcut if unresolvable

This commit is contained in:
Aleksandras Kostarevas 2024-09-18 09:17:37 +03:00
parent 7a01d1e6e6
commit 69a74799e3

View File

@ -402,7 +402,7 @@ data class BaseKey(
val expandedSpec: String? = params.mTextsSet.resolveTextReference(
if(attributes.useKeySpecShortcut != false) { relevantSpecShortcut?.get(0) } else { null }
?: spec
)
) ?: params.mTextsSet.resolveTextReference(spec)
val label = expandedSpec?.let { KeySpecParser.getLabel(it) } ?: ""
val icon = expandedSpec?.let { KeySpecParser.getIconId(it) } ?: ""