mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-24 00:59:05 +01:00
Fix chat bubbles not rendering due to ConstraintLayout bug.
Resolves signalapp/Signal-Android#14774
This commit is contained in:
committed by
jeffrey-signal
parent
54df95727b
commit
f43db8ace0
+4
-1
@@ -761,11 +761,14 @@ class ConversationFragment :
|
||||
split.second
|
||||
}
|
||||
|
||||
binding.conversationItemRecycler.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom ->
|
||||
binding.conversationItemRecycler.addOnLayoutChangeListener { _, left, top, right, bottom, _, _, _, _ ->
|
||||
viewModel.onChatBoundsChanged(Rect(left, top, right, bottom))
|
||||
}
|
||||
|
||||
binding.toolbar.addOnLayoutChangeListener { _, _, _, _, bottom, _, _, _, oldBottom ->
|
||||
// Bug: ConstraintLayout's solver can transiently place the toolbar at a negative position during the very first layout, preventing future RV layouts
|
||||
if (bottom < 0) return@addOnLayoutChangeListener
|
||||
|
||||
binding.conversationItemRecycler.padding(top = bottom)
|
||||
if (bottom != oldBottom && ::conversationHeaderPositionDecoration.isInitialized) {
|
||||
val newMargin = bottom + 16.dp
|
||||
|
||||
Reference in New Issue
Block a user