Use brackets for if/else

This commit is contained in:
Dmitriy Chernysh 2023-10-13 15:36:11 +03:00
parent f02ba5fae9
commit c32d85a18e
1 changed files with 3 additions and 2 deletions

View File

@ -1725,9 +1725,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
private fun MyKeyboard.Key.calcKeyWidth(containerWidth: Int): Int {
val popupKeyCount = this.popupCharacters!!.length
return if (popupKeyCount > containerWidth / this.width)
return if (popupKeyCount > containerWidth / this.width) {
containerWidth / popupKeyCount
else
} else {
this.width
}
}
}