From ed89f7fb1b93eef930ebcff38b7e0b8e5213ce2b Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 12 Aug 2021 13:50:37 +0200 Subject: [PATCH] Fix composerView having issues with long texts pasted from gboard clipboard The pasted text would not properly fill the editText, but show moved up with empty space below instead. Change-Id: I82d2a0bafbb402ec0728f21075d4641fbce90890 --- .../app/features/home/room/detail/composer/TextComposerView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt index cd8a5a87fe..44c60fb218 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt @@ -85,10 +85,12 @@ class TextComposerView @JvmOverloads constructor( val shouldShowSendButton = currentConstraintSetId == R.layout.composer_layout_constraint_set_expanded || !isBlank || alwaysShowSendButton TransitionManager.endTransitions(this@TextComposerView) if (views.sendButton.isVisible != shouldShowSendButton) { + /* This causes some weird layout bug when using gboard clipboard to paste longer texts TransitionManager.beginDelayedTransition( this@TextComposerView, AutoTransition().also { it.duration = 150 } ) + */ views.sendButton.isInvisible = !shouldShowSendButton } updateSendButtonColor(isBlank)