PageFragment: scroll to top on new page

Fixes an issue where new pages sometimes are shown at the position of
the previous page instead of from their start.
This commit is contained in:
dece 2023-04-12 19:57:29 +02:00
parent 0059b7ff4f
commit 503075f4d0

View file

@ -134,6 +134,7 @@ class PageFragment : Fragment(), PageAdapter.Listener {
binding.addressBar.setTextColor(resources.getColor(R.color.url_bar_loading, null))
}
PageViewModel.State.RECEIVING -> {
binding.contentRecycler.smoothScrollToPosition(0)
binding.contentSwipeLayout.isRefreshing = false
}
}