mAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
    override fun onItemRangeInserted(positionStart: Int, itemCount: Int) {
        if (positionStart == 0) {
            recyclerView.smoothScrollToPosition(0)
        }
    }
})
Copy the code

How do I refresh a RecyclerView + PagedListAdapter and scroll to top?