From da943770df8da1502739fda30a941f33f155a3fc Mon Sep 17 00:00:00 2001 From: Axel Labarre Date: Wed, 10 May 2023 23:02:53 +0200 Subject: [PATCH] using same order of constants writed in json object --- .../simplemobiletools/calculator/helpers/CalculatorImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt index dbdf420..480978e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/helpers/CalculatorImpl.kt @@ -449,10 +449,10 @@ class CalculatorImpl( val jsonObject = JSONTokener(json).nextValue() as JSONObject currentResult = jsonObject.getString(RES) previousCalculation = jsonObject.getString(PREVIOUS_CALCULATION) + lastKey = jsonObject.getString(LAST_KEY) + lastOperation = jsonObject.getString(LAST_OPERATION) baseValue = jsonObject.getDouble(BASE_VALUE) secondValue = jsonObject.getDouble(SECOND_VALUE) inputDisplayedFormula = jsonObject.getString(INPUT_DISPLAYED_FORMULA) - lastKey = jsonObject.getString(LAST_KEY) - lastOperation = jsonObject.getString(LAST_OPERATION) } }