release/2.1 #36

Merged
fabian merged 12 commits from release/2.1 into master 2023-03-10 17:21:17 +01:00
Showing only changes of commit a1f344580d - Show all commits

View File

@@ -203,13 +203,24 @@ class CounterViewModel @Inject constructor(
override fun digitClicked(digit: String) { override fun digitClicked(digit: String) {
focusLastInput() focusLastInput()
if(activeValue.digitCount() < 5)
if(activeValue.digitCount() >= 5)
{ {
activeValue += digit // 5 digits is enough
return
}
val newValue = activeValue + digit
try {
activeValue = newValue.toInt().toString()
} catch (_: NumberFormatException)
{
}
updateOtherScore() updateOtherScore()
updateSubmitButton() updateSubmitButton()
} }
}
override fun negateClicked() { override fun negateClicked() {
focusLastInput() focusLastInput()