Skip to content

Commit

Permalink
fix: closing keyboard or back pressing when editing a message (#2467)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michał Saleniuk <[email protected]>
  • Loading branch information
3 people authored Nov 24, 2023
1 parent ca097d8 commit 2d9a304
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 2d9a304

Please sign in to comment.