Adds a space after inserting the username to avoid issues in some keyboards.

This commit is contained in:
Vitor Pamplona
2026-03-31 16:22:57 -04:00
parent 44d100f60a
commit 49850e773f
@@ -193,7 +193,7 @@ class UserSuggestionState(
item: User,
): TextFieldValue {
val lastWordStart = message.selection.end - word.length
val wordToInsert = "@${item.pubkeyNpub()}"
val wordToInsert = "@${item.pubkeyNpub()} "
return TextFieldValue(
message.text.replaceRange(lastWordStart, message.selection.end, wordToInsert),
@@ -206,7 +206,7 @@ class UserSuggestionState(
word: String,
item: User,
) {
val wordToInsert = "@${item.pubkeyNpub()}"
val wordToInsert = "@${item.pubkeyNpub()} "
state.edit {
val lastWordStart = selection.end - word.length
replace(lastWordStart, selection.end, wordToInsert)