Fix issue where bottom bar padding would only appear on second entry.

This commit is contained in:
Alex Hart
2025-11-17 13:52:14 -04:00
committed by Cody Henthorne
parent 8149c469c8
commit be3d231fcc

View File

@@ -2324,14 +2324,17 @@ class ConversationFragment :
val additionalScrollOffset = 54.dp
if (isVisible) {
bottomActionBar.visibility = View.INVISIBLE
ViewUtil.animateIn(bottomActionBar, bottomActionBar.enterAnimation)
animationsAllowed = false
bottomActionBar.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
if (bottomActionBar.measuredHeight == 0) {
return
}
bottomActionBar.viewTreeObserver.removeOnGlobalLayoutListener(this)
ViewUtil.animateIn(bottomActionBar, bottomActionBar.enterAnimation)
container.hideInput()
inputPanel.setHideForSelection(true)