mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-25 23:36:23 +02:00
New Public Message screen: to field should get focus if it is empty, otherwise the message field should have the focus
This commit is contained in:
@@ -173,7 +173,7 @@ fun PublicMessageScreenContent(
|
||||
) {
|
||||
SendDirectMessageTo(postViewModel, accountViewModel)
|
||||
|
||||
MessageFieldRow(postViewModel, accountViewModel)
|
||||
MessageFieldRow(postViewModel, accountViewModel, postViewModel.toUsers.text.isNotBlank())
|
||||
|
||||
DisplayPreviews(postViewModel.urlPreviews, accountViewModel, nav)
|
||||
|
||||
@@ -327,9 +327,11 @@ fun SendDirectMessageTo(
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
launch {
|
||||
delay(200)
|
||||
focusRequester.requestFocus()
|
||||
if (postViewModel.toUsers.text.isBlank()) {
|
||||
launch {
|
||||
delay(200)
|
||||
focusRequester.requestFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user