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