Updated on 2026-08-14
This commit is contained in:
parent
99a8c6623b
commit
2c90ae7209
2 changed files with 20 additions and 12 deletions
|
|
@ -67,13 +67,17 @@ internal class ImportSeedPhraseUiStateBuilder(
|
|||
val text = st.words.text
|
||||
val wordsFromText = text.split(" ").filter { it.isNotBlank() }.map { it.trim() }
|
||||
val newWords = wordsFromText.dropLast(1) + word
|
||||
val newWordsText = newWords.joinToString(" ")
|
||||
st.copy(
|
||||
words = TextFieldValue(
|
||||
text = newWordsText,
|
||||
selection = TextRange(newWordsText.length),
|
||||
),
|
||||
val newWordsText = newWords.joinToString(" ").plus(" ")
|
||||
val newWordsState = TextFieldValue(
|
||||
text = newWordsText,
|
||||
selection = TextRange(newWordsText.length),
|
||||
)
|
||||
st.copy(
|
||||
words = newWordsState,
|
||||
).also {
|
||||
launchInterceptWords(wordsField = newWordsState)
|
||||
suggestNextWord(newWordsState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,13 +58,17 @@ internal class ImportSeedPhraseUiStateBuilder(
|
|||
val text = st.words.text
|
||||
val wordsFromText = text.split(" ").filter { it.isNotBlank() }.map { it.trim() }
|
||||
val newWords = wordsFromText.dropLast(1) + word
|
||||
val newWordsText = newWords.joinToString(" ")
|
||||
st.copy(
|
||||
words = TextFieldValue(
|
||||
text = newWordsText,
|
||||
selection = TextRange(newWordsText.length),
|
||||
),
|
||||
val newWordsText = newWords.joinToString(" ").plus(" ")
|
||||
val newWordsState = TextFieldValue(
|
||||
text = newWordsText,
|
||||
selection = TextRange(newWordsText.length),
|
||||
)
|
||||
st.copy(
|
||||
words = newWordsState,
|
||||
).also {
|
||||
launchInterceptWords(wordsField = newWordsState)
|
||||
suggestNextWord(newWordsState)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue