From 49850e773f61067abc7dc235b6daf8739182f5ca Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 31 Mar 2026 16:22:57 -0400 Subject: [PATCH] Adds a space after inserting the username to avoid issues in some keyboards. --- .../ui/note/creators/userSuggestions/UserSuggestionState.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/userSuggestions/UserSuggestionState.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/userSuggestions/UserSuggestionState.kt index b1da7a1ba..9643e4d07 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/userSuggestions/UserSuggestionState.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/creators/userSuggestions/UserSuggestionState.kt @@ -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)