From cd9416a1697fea889e1fcc1bd713abd210e2014b Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 22 May 2024 09:48:18 +0200 Subject: [PATCH 1/2] fix: jumping keyboard --- .../android/ui/home/messagecomposer/EnabledMessageComposer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 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..3bb1235b587 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 @@ -301,11 +301,11 @@ fun EnabledMessageComposer( if (additionalOptionStateHolder.selectedOption == AdditionalOptionSelectItem.DrawingMode) { DrawingCanvasBottomSheet( onDismissSketch = { - inputStateHolder.collapseComposer(additionalOptionStateHolder.additionalOptionsSubMenuState) + showAdditionalOptionsMenu() }, onSendSketch = { onAttachmentPicked(UriAsset(it)) - inputStateHolder.collapseComposer(additionalOptionStateHolder.additionalOptionsSubMenuState) + showAdditionalOptionsMenu() }, conversationTitle = CurrentConversationDetailsCache.conversationName.asString(), tempWritableImageUri = tempWritableImageUri From 9a2456b6c6546e930efeda0ad2205ba298bffd37 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 22 May 2024 14:46:18 +0200 Subject: [PATCH 2/2] chore: recomposition fix for attachment keyboard and draw --- .../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 3bb1235b587..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 = { - showAdditionalOptionsMenu() - }, - onSendSketch = { - onAttachmentPicked(UriAsset(it)) - showAdditionalOptionsMenu() - }, - 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() }