pull/94/head
kunfei 5 years ago
parent af3c9c2ccc
commit 158be0770b
  1. 5
      app/src/main/java/io/legado/app/help/AdapterDataObserverHeader.kt
  2. 2
      app/src/main/java/io/legado/app/help/FirstTopListUpCallback.kt

@ -2,7 +2,10 @@ package io.legado.app.help
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
internal class AdapterDataObserverProxy(var adapterDataObserver: RecyclerView.AdapterDataObserver, var headerCount: Int) : RecyclerView.AdapterDataObserver() { internal class AdapterDataObserverHeader(
var adapterDataObserver: RecyclerView.AdapterDataObserver,
var headerCount: Int
) : RecyclerView.AdapterDataObserver() {
override fun onChanged() { override fun onChanged() {
adapterDataObserver.onChanged() adapterDataObserver.onChanged()
} }

@ -4,7 +4,7 @@ import androidx.recyclerview.widget.ListUpdateCallback
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
class ToTopListUpCallback : ListUpdateCallback { class FirstTopListUpCallback : ListUpdateCallback {
var firstInsert = -1 var firstInsert = -1
lateinit var adapter: RecyclerView.Adapter<ItemViewHolder> lateinit var adapter: RecyclerView.Adapter<ItemViewHolder>
Loading…
Cancel
Save