Skip to content

Commit bd82705

Browse files
committed
Make sure input last is read and purged.
1 parent ee9b776 commit bd82705

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -947,15 +947,12 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown
947947

948948
list += array
949949
val historyCursor = customState.getInt(HISTORY_CURSOR_KEY)
950+
val inputLast = InstanceStateUtils.readAndPurgeTempInstance(INPUT_LAST_KEY, "", savedState.state)
950951
// if cursor does not match the number of history entries, it means the temp file with history has been deleted
951952
if (historyCursor == list.size) {
952953
history.historyList = list
953954
history.historyCursor = historyCursor
954-
history.inputLast = InstanceStateUtils.readAndPurgeTempInstance<String>(
955-
INPUT_LAST_KEY,
956-
"",
957-
savedState.state
958-
)
955+
history.inputLast = inputLast
959956
}
960957

961958
visibility = customState.getInt(VISIBILITY_KEY)

0 commit comments

Comments
 (0)