|
|
@ -75,11 +75,19 @@ class BookSourceAdapter(context: Context, val callBack: CallBack) : |
|
|
|
cb_book_source.text = |
|
|
|
cb_book_source.text = |
|
|
|
String.format("%s (%s)", item.bookSourceName, item.bookSourceGroup) |
|
|
|
String.format("%s (%s)", item.bookSourceName, item.bookSourceGroup) |
|
|
|
} |
|
|
|
} |
|
|
|
cb_book_source.isChecked = item.enabled |
|
|
|
swt_enabled.isChecked = item.enabled |
|
|
|
cb_book_source.setOnClickListener { |
|
|
|
swt_enabled.onClick { |
|
|
|
item.enabled = cb_book_source.isChecked |
|
|
|
item.enabled = swt_enabled.isChecked |
|
|
|
callBack.update(item) |
|
|
|
callBack.update(item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
cb_book_source.isChecked = selectedIds.contains(item.bookSourceUrl) |
|
|
|
|
|
|
|
cb_book_source.setOnClickListener { |
|
|
|
|
|
|
|
if (cb_book_source.isChecked) { |
|
|
|
|
|
|
|
selectedIds.add(item.bookSourceUrl) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
selectedIds.remove(item.bookSourceUrl) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
iv_edit.onClick { callBack.edit(item) } |
|
|
|
iv_edit.onClick { callBack.edit(item) } |
|
|
|
iv_menu_more.onClick { |
|
|
|
iv_menu_more.onClick { |
|
|
|
val popupMenu = PopupMenu(context, it) |
|
|
|
val popupMenu = PopupMenu(context, it) |
|
|
|