Fix crash when accessing binding via delayed runnable.

This commit is contained in:
Alex Hart
2023-07-14 11:55:37 -03:00
committed by Nicholas Tinsley
parent 09813d5dbd
commit f6bbb59400

View File

@@ -2110,10 +2110,12 @@ class ConversationFragment :
fun hide() {
pendingHide = true
binding.scrollDateHeader.postDelayed({
val header = binding.scrollDateHeader
header.postDelayed({
if (pendingHide) {
pendingHide = false
ViewUtil.animateOut(binding.scrollDateHeader, slideOut)
ViewUtil.animateOut(header, slideOut)
}
}, SCROLL_HEADER_CLOSE_DELAY)
}