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