|
|
|
@ -68,6 +68,7 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) : |
|
|
|
|
|
|
|
|
|
override fun convert(holder: ItemViewHolder, item: BookSource, payloads: MutableList<Any>) { |
|
|
|
|
with(holder.itemView) { |
|
|
|
|
if (payloads.isEmpty()) { |
|
|
|
|
this.setBackgroundColor(context.backgroundColor) |
|
|
|
|
if (item.bookSourceGroup.isNullOrEmpty()) { |
|
|
|
|
cb_book_source.text = item.bookSourceName |
|
|
|
@ -102,7 +103,12 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) : |
|
|
|
|
} |
|
|
|
|
popupMenu.show() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
when (payloads[0]) { |
|
|
|
|
1 -> cb_book_source.isChecked = selectedIds.contains(item.bookSourceUrl) |
|
|
|
|
2 -> swt_enabled.isChecked = item.enabled |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|