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
This commit is contained in:
SpiritCroc 2021-08-12 13:50:37 +02:00
parent 2ff3989230
commit ed89f7fb1b
1 changed files with 2 additions and 0 deletions

View File

@ -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)