add a hackfix for pressing Root as first operation

This commit is contained in:
tibbi 2020-12-28 19:58:55 +01:00
parent 4c132d1acf
commit 210020895f
1 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,9 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
}
if (operation == ROOT && inputDisplayedFormula == "0") {
inputDisplayedFormula = ""
if (lastKey != DIGIT) {
inputDisplayedFormula = "1√"
}
}
val lastChar = inputDisplayedFormula.last().toString()