From 936fe59b2b95bd724a332cadaff6c402bd8be869 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:04:29 +0800 Subject: [PATCH] Fix dict rule import --- .../ui/association/FileAssociationActivity.kt | 30 +++++-------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt b/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt index 67dd2f8d39b7..da99ac719e40 100644 --- a/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt +++ b/app/src/main/java/io/legado/app/ui/association/FileAssociationActivity.kt @@ -72,29 +72,13 @@ class FileAssociationActivity : } viewModel.successLive.observe(this) { when (it.first) { - "bookSource" -> showDialogFragment( - ImportBookSourceDialog(it.second, true) - ) - - "rssSource" -> showDialogFragment( - ImportRssSourceDialog(it.second, true) - ) - - "replaceRule" -> showDialogFragment( - ImportReplaceRuleDialog(it.second, true) - ) - - "httpTts" -> showDialogFragment( - ImportHttpTtsDialog(it.second, true) - ) - - "theme" -> showDialogFragment( - ImportThemeDialog(it.second, true) - ) - - "txtRule" -> showDialogFragment( - ImportTxtTocRuleDialog(it.second, true) - ) + "bookSource" -> showDialogFragment(ImportBookSourceDialog(it.second, true)) + "rssSource" -> showDialogFragment(ImportRssSourceDialog(it.second, true)) + "replaceRule" -> showDialogFragment(ImportReplaceRuleDialog(it.second, true)) + "httpTts" -> showDialogFragment(ImportHttpTtsDialog(it.second, true)) + "theme" -> showDialogFragment(ImportThemeDialog(it.second, true)) + "txtRule" -> showDialogFragment(ImportTxtTocRuleDialog(it.second, true)) + "dictRule" -> showDialogFragment(ImportDictRuleDialog(it.second, true)) } } viewModel.errorLive.observe(this) {