fix timeline jumping to top when activity is recreated (#2364)

This commit is contained in:
Konrad Pozniak 2022-03-03 20:01:47 +01:00 committed by GitHub
parent 497b434663
commit 73e9338f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,10 @@ class TimelinePagingAdapter(
)
}
init {
stateRestorationPolicy = StateRestorationPolicy.PREVENT_WHEN_EMPTY
}
override fun onCreateViewHolder(viewGroup: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
return when (viewType) {
VIEW_TYPE_STATUS -> {