|
|
@ -4,9 +4,10 @@ import android.os.Bundle |
|
|
|
import androidx.recyclerview.widget.DiffUtil |
|
|
|
import androidx.recyclerview.widget.DiffUtil |
|
|
|
import io.legado.app.data.entities.SearchBook |
|
|
|
import io.legado.app.data.entities.SearchBook |
|
|
|
|
|
|
|
|
|
|
|
class DiffCallBack(private val oldItems: List<SearchBook>, private val newItems: List<SearchBook>) : |
|
|
|
class DiffCallBack( |
|
|
|
|
|
|
|
private val oldItems: List<SearchBook>, |
|
|
|
DiffUtil.Callback() { |
|
|
|
private val newItems: List<SearchBook> |
|
|
|
|
|
|
|
) : DiffUtil.Callback() { |
|
|
|
|
|
|
|
|
|
|
|
override fun getOldListSize(): Int { |
|
|
|
override fun getOldListSize(): Int { |
|
|
|
return oldItems.size |
|
|
|
return oldItems.size |
|
|
|