Skip to content

Commit

Permalink
fixing missing input cursor due to decoration box not taking the orig…
Browse files Browse the repository at this point in the history
…inal text field into account
  • Loading branch information
ouchadam committed Sep 29, 2022
1 parent 0283073 commit e0c1421
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "",
)
Expand Down

0 comments on commit e0c1421

Please sign in to comment.