using same order of constants writed in json object

This commit is contained in:
Axel Labarre 2023-05-10 23:02:53 +02:00
parent 9734007b59
commit da943770df

View file

@ -449,10 +449,10 @@ class CalculatorImpl(
val jsonObject = JSONTokener(json).nextValue() as JSONObject val jsonObject = JSONTokener(json).nextValue() as JSONObject
currentResult = jsonObject.getString(RES) currentResult = jsonObject.getString(RES)
previousCalculation = jsonObject.getString(PREVIOUS_CALCULATION) previousCalculation = jsonObject.getString(PREVIOUS_CALCULATION)
lastKey = jsonObject.getString(LAST_KEY)
lastOperation = jsonObject.getString(LAST_OPERATION)
baseValue = jsonObject.getDouble(BASE_VALUE) baseValue = jsonObject.getDouble(BASE_VALUE)
secondValue = jsonObject.getDouble(SECOND_VALUE) secondValue = jsonObject.getDouble(SECOND_VALUE)
inputDisplayedFormula = jsonObject.getString(INPUT_DISPLAYED_FORMULA) inputDisplayedFormula = jsonObject.getString(INPUT_DISPLAYED_FORMULA)
lastKey = jsonObject.getString(LAST_KEY)
lastOperation = jsonObject.getString(LAST_OPERATION)
} }
} }