|
|
|
@ -42,11 +42,20 @@ class BooksDiffCallBack(private val oldItems: List<Book>, private val newItems: |
|
|
|
|
val oldItem = oldItems[oldItemPosition] |
|
|
|
|
val newItem = newItems[newItemPosition] |
|
|
|
|
val bundle = bundleOf() |
|
|
|
|
if (oldItem.name != newItem.name) bundle.putString("name", null) |
|
|
|
|
if (oldItem.author != newItem.author) bundle.putString("author", null) |
|
|
|
|
if (oldItem.durChapterTitle != newItem.durChapterTitle) bundle.putString("dur", null) |
|
|
|
|
if (oldItem.latestChapterTitle != newItem.latestChapterTitle) bundle.putString("last", null) |
|
|
|
|
if (oldItem.getDisplayCover() != newItem.getDisplayCover()) bundle.putString("cover", null) |
|
|
|
|
if (oldItem.name != newItem.name) bundle.putString("name", newItem.name) |
|
|
|
|
if (oldItem.author != newItem.author) bundle.putString("author", newItem.author) |
|
|
|
|
if (oldItem.durChapterTitle != newItem.durChapterTitle) bundle.putString( |
|
|
|
|
"dur", |
|
|
|
|
newItem.durChapterTitle |
|
|
|
|
) |
|
|
|
|
if (oldItem.latestChapterTitle != newItem.latestChapterTitle) bundle.putString( |
|
|
|
|
"last", |
|
|
|
|
newItem.latestChapterTitle |
|
|
|
|
) |
|
|
|
|
if (oldItem.getDisplayCover() != newItem.getDisplayCover()) bundle.putString( |
|
|
|
|
"cover", |
|
|
|
|
newItem.getDisplayCover() |
|
|
|
|
) |
|
|
|
|
if (oldItem.lastCheckCount != newItem.lastCheckCount |
|
|
|
|
|| oldItem.durChapterTime != newItem.durChapterTime |
|
|
|
|
|| oldItem.getUnreadChapterNum() != newItem.getUnreadChapterNum() |
|
|
|
|