From 272232291f1da0d5f969d9efea54f48ed95356dc Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 8 Feb 2020 14:35:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/book/source/manage/BookSourceActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()