fixing missing input cursor due to decoration box not taking the original text field into account

This commit is contained in:
Adam Brown 2022-09-29 17:42:31 +01:00
parent 0283073534
commit e0c1421fd5
1 changed files with 4 additions and 3 deletions

View File

@ -598,10 +598,11 @@ private fun TextComposer(state: ComposerState.Text, onTextChange: (String) -> Un
cursorBrush = SolidColor(MaterialTheme.colorScheme.primary),
textStyle = LocalTextStyle.current.copy(color = SmallTalkTheme.extendedColors.onOthersBubble),
keyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.Sentences, autoCorrect = true),
decorationBox = {
Box {
decorationBox = { innerField ->
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
Box(modifier = Modifier.weight(1f).padding(end = 4.dp)) { innerField() }
Icon(
modifier = Modifier.align(Alignment.CenterEnd).clickable { onAttach() },
modifier = Modifier.clickable { onAttach() }.wrapContentWidth().align(Alignment.Bottom),
imageVector = Icons.Filled.Image,
contentDescription = "",
)