From 273402df5d7335b06560e30df61451073d132b1f Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 18 Oct 2020 00:07:10 +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 --- .../ui/book/arrange/ArrangeBookActivity.kt | 20 ------------------- .../app/ui/book/arrange/ArrangeBookAdapter.kt | 2 +- app/src/main/res/menu/arrange_book.xml | 16 --------------- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt index c980fe30c..af949ce68 100644 --- a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookActivity.kt @@ -133,26 +133,6 @@ class ArrangeBookActivity : VMBaseActivity(R.layout.activi when (item.itemId) { R.id.menu_group_manage -> GroupManageDialog() .show(supportFragmentManager, "groupManage") - R.id.menu_no_group -> { - title_bar.subtitle = getString(R.string.no_group) - groupId = AppConst.bookGroupNoneId - initBookData() - } - R.id.menu_all -> { - title_bar.subtitle = item.title - groupId = AppConst.bookGroupAllId - initBookData() - } - R.id.menu_local -> { - title_bar.subtitle = item.title - groupId = AppConst.bookGroupLocalId - initBookData() - } - R.id.menu_audio -> { - title_bar.subtitle = item.title - groupId = AppConst.bookGroupAudioId - initBookData() - } else -> if (item.groupId == R.id.menu_group) { title_bar.subtitle = item.title groupId = App.db.bookGroupDao().getByName(item.title.toString())?.groupId ?: 0 diff --git a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt index b6a98cb62..2b05b7014 100644 --- a/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/arrange/ArrangeBookAdapter.kt @@ -112,7 +112,7 @@ class ArrangeBookAdapter(context: Context, val callBack: CallBack) : private fun getGroupList(groupId: Long): List { val groupNames = arrayListOf() callBack.groupList.forEach { - if (it.groupId and groupId > 0) { + if (it.groupId > 0 && it.groupId and groupId > 0) { groupNames.add(it.groupName) } } diff --git a/app/src/main/res/menu/arrange_book.xml b/app/src/main/res/menu/arrange_book.xml index 4eb85fb8e..625bbbfe5 100644 --- a/app/src/main/res/menu/arrange_book.xml +++ b/app/src/main/res/menu/arrange_book.xml @@ -14,22 +14,6 @@ android:id="@+id/menu_group_manage" android:title="@string/group_manage" /> - - - - - - - -