From 29d31190dc6567a3ce9ab5ca68bf74870eddc5eb Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 20 Nov 2021 13:09:41 +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/arrange/ArrangeBookActivity.kt | 2 +- .../io/legado/app/ui/book/local/ImportBookActivity.kt | 2 +- .../app/ui/book/local/rule/TxtTocRuleActivity.kt | 11 +++++++++++ .../app/ui/book/local/rule/TxtTocRuleViewModel.kt | 4 ++-- .../app/ui/book/source/manage/BookSourceActivity.kt | 2 +- .../io/legado/app/ui/replace/ReplaceRuleActivity.kt | 2 +- .../app/ui/rss/source/manage/RssSourceActivity.kt | 5 ++--- .../app/ui/rss/source/manage/RssSourceViewModel.kt | 10 ++-------- .../java/io/legado/app/ui/widget/SelectActionBar.kt | 4 ++-- 9 files changed, 23 insertions(+), 19 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 8b05ec3b2..77f9f313a 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 @@ -84,7 +84,7 @@ class ArrangeBookActivity : VMBaseActivity viewModel.enableSelection(adapter.selection) R.id.menu_disable_selection -> viewModel.disableSelection(adapter.selection) - R.id.menu_del_selection -> viewModel.delSelection(adapter.selection) R.id.menu_top_sel -> viewModel.topSource(*adapter.selection.toTypedArray()) R.id.menu_bottom_sel -> viewModel.bottomSource(*adapter.selection.toTypedArray()) R.id.menu_export_selection -> viewModel.saveToFile(adapter.selection) { file -> @@ -211,13 +210,13 @@ class RssSourceActivity : VMBaseActivity) { - execute { - appDb.rssSourceDao.delete(*sources.toTypedArray()) - } - } - fun saveToFile(sources: List, success: (file: File) -> Unit) { execute { val path = "${context.filesDir}/shareRssSource.json" diff --git a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt index 57b926137..c381b391f 100644 --- a/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/SelectActionBar.kt @@ -42,7 +42,7 @@ class SelectActionBar @JvmOverloads constructor( } } binding.btnRevertSelection.setOnClickListener { callBack?.revertSelection() } - binding.btnSelectActionMain.setOnClickListener { callBack?.onClickMainAction() } + binding.btnSelectActionMain.setOnClickListener { callBack?.onClickSelectBarMainAction() } binding.ivMenuMore.setOnClickListener { selMenu?.show() } } @@ -108,6 +108,6 @@ class SelectActionBar @JvmOverloads constructor( fun revertSelection() - fun onClickMainAction() {} + fun onClickSelectBarMainAction() {} } } \ No newline at end of file