mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
Fixed changing operator after dividing by zero (#202)
This commit is contained in:
@ -118,8 +118,14 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
if (getSecondValue() == 0.0 && inputDisplayedFormula.contains("÷")) {
|
||||
lastKey = DIVIDE
|
||||
lastOperation = DIVIDE
|
||||
} else {
|
||||
lastKey = operation
|
||||
lastOperation = operation
|
||||
}
|
||||
|
||||
showNewResult(inputDisplayedFormula)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user