From bd8270507c25487970ffed63cc8126e255a3d050 Mon Sep 17 00:00:00 2001 From: khaykov Date: Fri, 4 Aug 2023 12:45:55 -0500 Subject: [PATCH] Make sure input last is read and purged. --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index 617691a1f..62ca1070f 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -947,15 +947,12 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown list += array val historyCursor = customState.getInt(HISTORY_CURSOR_KEY) + val inputLast = InstanceStateUtils.readAndPurgeTempInstance(INPUT_LAST_KEY, "", savedState.state) // if cursor does not match the number of history entries, it means the temp file with history has been deleted if (historyCursor == list.size) { history.historyList = list history.historyCursor = historyCursor - history.inputLast = InstanceStateUtils.readAndPurgeTempInstance( - INPUT_LAST_KEY, - "", - savedState.state - ) + history.inputLast = inputLast } visibility = customState.getInt(VISIBILITY_KEY)