From f0006df29e9f01b85df3ccb8d678f5db26f089b2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 8 May 2022 20:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96tts=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/association/OnLineImportActivity.kt | 3 +++ .../java/io/legado/app/ui/association/OnLineImportViewModel.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/association/OnLineImportActivity.kt b/app/src/main/java/io/legado/app/ui/association/OnLineImportActivity.kt index ad0aad692..d25f5007f 100644 --- a/app/src/main/java/io/legado/app/ui/association/OnLineImportActivity.kt +++ b/app/src/main/java/io/legado/app/ui/association/OnLineImportActivity.kt @@ -31,6 +31,9 @@ class OnLineImportActivity : "replaceRule" -> showDialogFragment( ImportReplaceRuleDialog(it.second, true) ) + "httpTts" -> showDialogFragment( + ImportHttpTtsDialog(it.second, true) + ) } } viewModel.errorLive.observe(this) { diff --git a/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt b/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt index 076a29f8a..06387eace 100644 --- a/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/OnLineImportViewModel.kt @@ -88,7 +88,7 @@ class OnLineImportViewModel(app: Application) : BaseAssociationViewModel(app) { json.contains("name") && json.contains("rule") -> importTextTocRule(json, finally) json.contains("name") && json.contains("url") -> - importHttpTTS(json, finally) + successLive.postValue(Pair("httpTts", json)) else -> errorLive.postValue("格式不对") } }