diff --git a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt index 19ea61c..91c1db0 100644 --- a/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt +++ b/app/src/main/kotlin/io/flamenet/messenger/app/ChatScreens.kt @@ -1429,6 +1429,19 @@ fun ColumnScope.ChatScreen( color = MaterialTheme.colorScheme.onSurface, ), cursorBrush = SolidColor(MaterialTheme.colorScheme.primary), + // Return sends — same convention iOS now defaults to. The + // send button stays for anyone who taps instead. + singleLine = true, + keyboardOptions = androidx.compose.foundation.text.KeyboardOptions( + imeAction = androidx.compose.ui.text.input.ImeAction.Send), + keyboardActions = androidx.compose.foundation.text.KeyboardActions( + onSend = { + if (draft.isNotBlank()) { + model.sendMessage(draft) + draft = "" + } + } + ), modifier = Modifier.fillMaxWidth().testTag("draft"), ) }