Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-22 09:56:57 +05:00
parent 99a8c6623b
commit 2c90ae7209
2 changed files with 20 additions and 12 deletions

View file

@ -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)
}
}
}

View file

@ -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)
}
}
}