feat: 修复bug

pull/238/head
gedoor 5 years ago
parent 3075b4b3e6
commit ebb1e2dd33
  1. 10
      app/src/main/java/io/legado/app/ui/book/changesource/DiffCallBack.kt

@ -24,13 +24,11 @@ class DiffCallBack(private val oldItems: List<SearchBook>, private val newItems:
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
val oldItem = oldItems[oldItemPosition]
val newItem = newItems[newItemPosition]
if (oldItem.originName != newItem.originName) {
return false
}
if (oldItem.latestChapterTitle != newItem.latestChapterTitle) {
return false
return when {
oldItem.originName != newItem.originName -> false
oldItem.latestChapterTitle != newItem.latestChapterTitle -> false
else -> true
}
return true
}
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? {

Loading…
Cancel
Save