diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 8cf268b67..cc50778e1 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -8,6 +8,7 @@ * 修复阅读界面加入书架后,书籍详情页还是显示加入书架按钮的bug * 修复低版本手机自动阅读速度拉动最左边崩溃的bug * 给亮度调节加个背景,很多人找不到 +* 修复替换分组选择无效的bug **2020/08/08** * 继续适配主题,现在应该所有地方都按照主题变色了 diff --git a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt index dd1014a59..e4b509efb 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt @@ -193,6 +193,9 @@ class ReplaceRuleActivity : VMBaseActivity(R.layout.activi type = arrayOf("text/*", "application/json"), allowExtensions = arrayOf("txt", "json") ) + else -> if (item.groupId == R.id.replace_group) { + search_view.setQuery(item.title, true) + } } return super.onCompatOptionsItemSelected(item) } @@ -207,9 +210,9 @@ class ReplaceRuleActivity : VMBaseActivity(R.layout.activi } private fun upGroupMenu() { - groupMenu?.removeGroup(R.id.source_group) + groupMenu?.removeGroup(R.id.replace_group) groups.map { - groupMenu?.add(R.id.source_group, Menu.NONE, Menu.NONE, it) + groupMenu?.add(R.id.replace_group, Menu.NONE, Menu.NONE, it) } } diff --git a/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt b/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt index 70c01a77a..1480c93cf 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt @@ -93,9 +93,9 @@ class RssSourceActivity : VMBaseActivity(R.layout.activity_r R.id.menu_import_source_qr -> startActivityForResult(qrRequestCode) R.id.menu_group_manage -> GroupManageDialog() .show(supportFragmentManager, "rssGroupManage") - } - if (item.groupId == R.id.source_group) { - search_view.setQuery(item.title, true) + else -> if (item.groupId == R.id.source_group) { + search_view.setQuery(item.title, true) + } } return super.onCompatOptionsItemSelected(item) } diff --git a/app/src/main/res/menu/replace_rule.xml b/app/src/main/res/menu/replace_rule.xml index 721ad9ddf..00cf348fe 100644 --- a/app/src/main/res/menu/replace_rule.xml +++ b/app/src/main/res/menu/replace_rule.xml @@ -16,7 +16,7 @@ android:id="@+id/menu_group_manage" android:title="@string/group_manage" /> - +