From 3af5e6ea76bf60447027671a5d1f5ca90beacdc3 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Mon, 2 Aug 2021 10:01:14 +0200 Subject: [PATCH] Missed scrollToPosition() -> scrollToPositionWithOffset() This should make the scroll position more reliable. Change-Id: Ideba69e14f122d0f93a6edad8d27612f7bc45f59 --- .../vector/app/features/home/room/detail/RoomDetailFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt index 22a8259cc5..e74e3e3c7d 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt @@ -797,7 +797,7 @@ class RoomDetailFragment @Inject constructor( roomDetailViewModel.timeline.restartWithEventId(null) } else { roomDetailViewModel.timeline.setInitialEventId(null) - layoutManager.scrollToPosition(0) + layoutManager.scrollToPositionWithOffset(0, 0) } }