1
0
mirror of https://github.com/accelforce/Yuito synced 2024-12-23 05:55:20 +01:00

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

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 -> {