File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/src/main/java/dev/dimension/flare/ui/screen/compose
desktopApp/src/main/kotlin/dev/dimension/flare/ui/screen/compose Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import androidx.compose.foundation.rememberScrollState
2626import androidx.compose.foundation.shape.CircleShape
2727import androidx.compose.foundation.shape.RoundedCornerShape
2828import androidx.compose.foundation.text.input.TextFieldState
29+ import androidx.compose.foundation.text.input.insert
2930import androidx.compose.material3.AssistChip
3031import androidx.compose.material3.ButtonGroup
3132import androidx.compose.material3.Card
@@ -833,7 +834,7 @@ private fun composePresenter(
833834
834835 fun selectEmoji (emoji : UiEmoji ) {
835836 textFieldState.edit {
836- append( emoji.insertText)
837+ insert(textFieldState.selection.start, emoji.insertText)
837838 }
838839 }
839840
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import androidx.compose.foundation.shape.CircleShape
2525import androidx.compose.foundation.shape.RoundedCornerShape
2626import androidx.compose.foundation.text.BasicTextField
2727import androidx.compose.foundation.text.input.TextFieldState
28+ import androidx.compose.foundation.text.input.insert
2829import androidx.compose.material.IconButton
2930import androidx.compose.runtime.Composable
3031import androidx.compose.runtime.CompositionLocalProvider
@@ -855,7 +856,7 @@ private fun composePresenter(
855856
856857 fun selectEmoji (emoji : UiEmoji ) {
857858 textFieldState.edit {
858- append( emoji.insertText)
859+ insert(textFieldState.selection.start, emoji.insertText)
859860 }
860861 }
861862
You can’t perform that action at this time.
0 commit comments