mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-24 09:58:31 +03:00
When scrolled to the bottom, stick there
Change-Id: I0c788368afef04d7541f633cd830f5bdbf665049
This commit is contained in:
parent
3f448b48c7
commit
1bd59e3c1c
1 changed files with 2 additions and 1 deletions
|
@ -2255,8 +2255,9 @@ class RoomDetailFragment @Inject constructor(
|
|||
}
|
||||
|
||||
private fun setInitialForceScrollEnabled(enabled: Boolean, stickToBottom: Boolean = false) {
|
||||
val shouldStickToBottom = stickToBottom || (!enabled && !views.timelineRecyclerView.canScrollVertically(1))
|
||||
scrollOnNewMessageCallback.initialForceScroll = enabled
|
||||
if (stickToBottom) {
|
||||
if (shouldStickToBottom) {
|
||||
layoutManager.disablePreferredAnchorPlacement()
|
||||
} else {
|
||||
// (Re-) Enable preferred anchor placement
|
||||
|
|
Loading…
Reference in a new issue