mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Fix scroll to message when bubble is under toolbar.
This commit is contained in:
committed by
Greyson Parrelli
parent
3ea194255d
commit
ba3473c61a
@@ -191,10 +191,10 @@ class ScrollToPositionDelegate private constructor(
|
||||
if (abs(layoutManager.findFirstVisibleItemPosition() - position) < SCROLL_ANIMATION_THRESHOLD) {
|
||||
val child: View? = layoutManager.findViewByPosition(position)
|
||||
if (child == null || !layoutManager.isViewPartiallyVisible(child, true, false)) {
|
||||
layoutManager.scrollToPositionWithOffset(position, recyclerView.height / 4)
|
||||
layoutManager.scrollToPositionWithOffset(position, recyclerView.height / 3)
|
||||
}
|
||||
} else {
|
||||
layoutManager.scrollToPositionWithOffset(position, recyclerView.height / 4)
|
||||
layoutManager.scrollToPositionWithOffset(position, recyclerView.height / 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user