Use brackets for if/else
This commit is contained in:
parent
f02ba5fae9
commit
c32d85a18e
|
@ -1725,9 +1725,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
private fun MyKeyboard.Key.calcKeyWidth(containerWidth: Int): Int {
|
private fun MyKeyboard.Key.calcKeyWidth(containerWidth: Int): Int {
|
||||||
val popupKeyCount = this.popupCharacters!!.length
|
val popupKeyCount = this.popupCharacters!!.length
|
||||||
|
|
||||||
return if (popupKeyCount > containerWidth / this.width)
|
return if (popupKeyCount > containerWidth / this.width) {
|
||||||
containerWidth / popupKeyCount
|
containerWidth / popupKeyCount
|
||||||
else
|
} else {
|
||||||
this.width
|
this.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue