mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Revert "[TEST] Initial force scroll only once"
Keep in mind that the position can change while we insert events, so we
want to keep it up-to-date.
This reverts commit 22cdb6544d
.
Change-Id: I43f391c14aeb087c7d3cc71c5c6af3fbabe0f835
This commit is contained in:
parent
6c99527ab8
commit
37d0b5098f
1 changed files with 0 additions and 2 deletions
|
@ -70,7 +70,6 @@ class ScrollOnNewMessageCallback(private val layoutManager: BetterLinearLayoutMa
|
|||
}
|
||||
if (scrollToEvent == null) {
|
||||
layoutManager.scrollToPositionWithOffset(0, 0)
|
||||
initialForceScroll = false
|
||||
layoutManager.setPreferredAnchorPosition(0)
|
||||
} else {
|
||||
timelineEventController.searchPositionOfEvent(scrollToEvent)?.let {
|
||||
|
@ -79,7 +78,6 @@ class ScrollOnNewMessageCallback(private val layoutManager: BetterLinearLayoutMa
|
|||
// from the bottom of the view, not the top).
|
||||
val scrollToPosition = max(it + scrollOffset + 1, 0)
|
||||
layoutManager.scrollToPositionWithOffset(scrollToPosition, (parentView.measuredHeight * RoomDetailFragment.TARGET_SCROLL_OUT_FACTOR).toInt())
|
||||
initialForceScroll = false
|
||||
layoutManager.setPreferredAnchorPosition(scrollToPosition)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue