@ -106,7 +106,6 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) :
} else {
when (payloads[0]) {
1 -> cb_book_source.isChecked = selected.contains(item)
2 -> swt_enabled.isChecked = item.enabled
}
@ -30,14 +30,4 @@ class DiffCallBack(
&& oldItem.enabled == newItem.enabled
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? {
val oldItem = oldItems[oldItemPosition]
val newItem = newItems[newItemPosition]
return when {
oldItem.bookSourceName == newItem.bookSourceName
&& oldItem.bookSourceGroup == newItem.bookSourceGroup
&& oldItem.enabled != newItem.enabled -> 2
else -> null