mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
don't expect number row to have 10 keys
This commit is contained in:
parent
c96326a256
commit
374b840127
1 changed files with 2 additions and 5 deletions
|
@ -251,11 +251,8 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
|||
// remove number from labels, to avoid awkward mix of numbers and others caused by layout popup keys
|
||||
params.mPopupKeyLabelSources.remove(POPUP_KEYS_NUMBER)
|
||||
}
|
||||
// add number to the first 10 keys in first row
|
||||
baseKeys.first().take(10).forEachIndexed { index, keyData -> keyData.popup.numberLabel = numberRow.getOrNull(index)?.label }
|
||||
if (baseKeys.first().size < 10) {
|
||||
Log.w(TAG, "first row only has ${baseKeys.first().size} keys: ${baseKeys.first().map { it.label }}")
|
||||
}
|
||||
// add number to the first first row
|
||||
baseKeys.first().forEachIndexed { index, keyData -> keyData.popup.numberLabel = numberRow.getOrNull(index)?.label }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue