pull/32/head
kunfei 6 years ago
parent c66990adf0
commit 998ce1815f
  1. 1
      app/src/main/java/io/legado/app/ui/main/booksource/BookSourceAdapter.kt

@ -74,6 +74,7 @@ class BookSourceAdapter : PagedListAdapter<BookSource, BookSourceAdapter.MyViewH
fun bind(bookSource: BookSource, checkedList: HashSet<String>, callBack: CallBack?) = with(itemView) { fun bind(bookSource: BookSource, checkedList: HashSet<String>, callBack: CallBack?) = with(itemView) {
cb_book_source.text = String.format("%s (%s)", bookSource.name, bookSource.group) cb_book_source.text = String.format("%s (%s)", bookSource.name, bookSource.group)
cb_book_source.isChecked = checkedList.contains(bookSource.origin)
cb_book_source.onClick { cb_book_source.onClick {
if (cb_book_source.isChecked) { if (cb_book_source.isChecked) {
checkedList.add(bookSource.origin) checkedList.add(bookSource.origin)

Loading…
Cancel
Save