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 { override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
val oldItem = oldItems[oldItemPosition] val oldItem = oldItems[oldItemPosition]
val newItem = newItems[newItemPosition] val newItem = newItems[newItemPosition]
if (oldItem.originName != newItem.originName) { return when {
return false oldItem.originName != newItem.originName -> false
} oldItem.latestChapterTitle != newItem.latestChapterTitle -> false
if (oldItem.latestChapterTitle != newItem.latestChapterTitle) { else -> true
return false
} }
return true
} }
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? { override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? {

Loading…
Cancel
Save