From 205895dfd61deeed84cce853b04a7d29f9226cc4 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 30 Sep 2021 22:33:22 +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 --- .../java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt | 6 +++--- .../legado/app/ui/book/source/manage/BookSourceActivity.kt | 3 +-- .../main/java/io/legado/app/ui/login/SourceLoginActivity.kt | 3 ++- .../java/io/legado/app/ui/replace/ReplaceRuleActivity.kt | 4 +--- .../io/legado/app/ui/rss/source/manage/RssSourceActivity.kt | 3 +-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt index 7ea647ae2..77f882c66 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt @@ -56,15 +56,15 @@ abstract class ReadBookBaseActivity : } fun showPaddingConfig() { - PaddingConfigDialog().show(supportFragmentManager, "paddingConfig") + showDialogFragment() } fun showBgTextConfig() { - BgTextConfigDialog().show(supportFragmentManager, "bgTextConfig") + showDialogFragment() } fun showClickRegionalConfig() { - ClickActionConfigDialog().show(supportFragmentManager, "clickActionConfig") + showDialogFragment() } /** 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 b9426dca8..275f7116a 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 @@ -124,8 +124,7 @@ class BookSourceActivity : VMBaseActivity viewModel.shareSelection(adapter.selection) { startActivity(Intent.createChooser(it, getString(R.string.share_selected_source))) } - R.id.menu_group_manage -> - GroupManageDialog().show(supportFragmentManager, "groupManage") + R.id.menu_group_manage -> showDialogFragment() R.id.menu_import_local -> importDoc.launch { mode = HandleFileContract.FILE allowExtensions = arrayOf("txt", "json") diff --git a/app/src/main/java/io/legado/app/ui/login/SourceLoginActivity.kt b/app/src/main/java/io/legado/app/ui/login/SourceLoginActivity.kt index c72f43b2f..41cf64240 100644 --- a/app/src/main/java/io/legado/app/ui/login/SourceLoginActivity.kt +++ b/app/src/main/java/io/legado/app/ui/login/SourceLoginActivity.kt @@ -6,6 +6,7 @@ import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.data.entities.BaseSource import io.legado.app.databinding.ActivitySourceLoginBinding +import io.legado.app.utils.showDialogFragment import io.legado.app.utils.viewbindingdelegate.viewBinding @@ -28,7 +29,7 @@ class SourceLoginActivity : VMBaseActivity() } } diff --git a/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt index 659f6afe3..389e22f0d 100644 --- a/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/replace/ReplaceRuleActivity.kt @@ -216,9 +216,7 @@ class ReplaceRuleActivity : VMBaseActivity editActivity.launch(ReplaceEditActivity.startIntent(this)) - R.id.menu_group_manage -> - GroupManageDialog().show(supportFragmentManager, "groupManage") - + R.id.menu_group_manage -> showDialogFragment() R.id.menu_del_selection -> viewModel.delSelection(adapter.selection) R.id.menu_import_onLine -> showImportDialog() R.id.menu_import_local -> importDoc.launch { 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 cbc9146dc..2315d902d 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 @@ -115,8 +115,7 @@ class RssSourceActivity : VMBaseActivity showImportDialog() R.id.menu_import_qr -> qrCodeResult.launch(null) - R.id.menu_group_manage -> GroupManageDialog() - .show(supportFragmentManager, "rssGroupManage") + R.id.menu_group_manage -> showDialogFragment() R.id.menu_share_source -> viewModel.shareSelection(adapter.selection) { startActivity(Intent.createChooser(it, getString(R.string.share_selected_source))) }