mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-02-03 09:17:35 +01:00
Fixed saving history for multiple equals use
This commit is contained in:
parent
78cfb80b0b
commit
d3f55a96e3
@ -243,9 +243,10 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
|
||||
|
||||
showNewResult(result.format())
|
||||
baseValue = result
|
||||
HistoryHelper(context).insertOrUpdateHistoryEntry(History(null, inputDisplayedFormula, result.format(), System.currentTimeMillis()))
|
||||
val newFormula = expression.replace("sqrt", "√").replace("*", "×").replace("/", "÷")
|
||||
HistoryHelper(context).insertOrUpdateHistoryEntry(History(null, newFormula, result.format(), System.currentTimeMillis()))
|
||||
inputDisplayedFormula = result.format()
|
||||
showNewFormula(expression.replace("sqrt", "√").replace("*", "×").replace("/", "÷"))
|
||||
showNewFormula(newFormula)
|
||||
} catch (e: Exception) {
|
||||
context.toast(R.string.unknown_error_occurred)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user