From 8983f40db47f652db5401fd78a9a5e5ff605f45d Mon Sep 17 00:00:00 2001 From: Yamil Medina Date: Wed, 22 May 2024 13:11:17 +0000 Subject: [PATCH] fix: jumping keyboard behavior (WPB-9357) (#3024) --- .../messagecomposer/EnabledMessageComposer.kt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/EnabledMessageComposer.kt b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/EnabledMessageComposer.kt index a8d0c86933b..1b18169353e 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/EnabledMessageComposer.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/messagecomposer/EnabledMessageComposer.kt @@ -297,24 +297,24 @@ fun EnabledMessageComposer( ) } } - - if (additionalOptionStateHolder.selectedOption == AdditionalOptionSelectItem.DrawingMode) { - DrawingCanvasBottomSheet( - onDismissSketch = { - inputStateHolder.collapseComposer(additionalOptionStateHolder.additionalOptionsSubMenuState) - }, - onSendSketch = { - onAttachmentPicked(UriAsset(it)) - inputStateHolder.collapseComposer(additionalOptionStateHolder.additionalOptionsSubMenuState) - }, - conversationTitle = CurrentConversationDetailsCache.conversationName.asString(), - tempWritableImageUri = tempWritableImageUri - ) - } } } } + if (additionalOptionStateHolder.selectedOption == AdditionalOptionSelectItem.DrawingMode) { + DrawingCanvasBottomSheet( + onDismissSketch = { + showAdditionalOptionsMenu() + }, + onSendSketch = { + onAttachmentPicked(UriAsset(it)) + showAdditionalOptionsMenu() + }, + conversationTitle = CurrentConversationDetailsCache.conversationName.asString(), + tempWritableImageUri = tempWritableImageUri + ) + } + BackHandler(inputStateHolder.inputType is MessageCompositionType.Editing) { cancelEdit() }