Skip to content

Commit

Permalink
fix: closing keyboard or back pressing when editing a message (#2463)
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk committed Nov 24, 2023
1 parent 7b7acec commit d0ace3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ fun EnabledMessageComposer(
}
}

BackHandler(inputStateHolder.inputType is MessageCompositionType.Editing) {
cancelEdit()
}
BackHandler(isImeVisible || inputStateHolder.optionsVisible) {
inputStateHolder.handleBackPressed(
isImeVisible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private fun InputContent(
onPlusClick: () -> Unit,
modifier: Modifier,
) {
if (!showOptions) {
if (!showOptions && inputType is MessageCompositionType.Composing) {
AdditionalOptionButton(
isSelected = false,
onClick = {
Expand Down

0 comments on commit d0ace3e

Please sign in to comment.