Skip to content

Commit

Permalink
Make sure input last is read and purged.
Browse files Browse the repository at this point in the history
  • Loading branch information
khaykov committed Aug 4, 2023
1 parent ee9b776 commit bd82705
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>(
INPUT_LAST_KEY,
"",
savedState.state
)
history.inputLast = inputLast
}

visibility = customState.getInt(VISIBILITY_KEY)
Expand Down

0 comments on commit bd82705

Please sign in to comment.