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