diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 8152ae3c8..4cd6dbe2f 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -162,7 +162,11 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity private fun initViewEvent() { cb_selected_all.onClick { - adapter.selectAll() + if (adapter.getSelection().size == adapter.getActualItemCount()) { + adapter.revertSelection() + } else { + adapter.selectAll() + } } btn_revert_selection.onClick { adapter.revertSelection()