优化tts导入

This commit is contained in:
kunfei
2022-05-08 20:06:45 +08:00
parent b34b14d3ae
commit e5dfee52e2
2 changed files with 4 additions and 1 deletions
@@ -31,6 +31,9 @@ class OnLineImportActivity :
"replaceRule" -> showDialogFragment( "replaceRule" -> showDialogFragment(
ImportReplaceRuleDialog(it.second, true) ImportReplaceRuleDialog(it.second, true)
) )
"httpTts" -> showDialogFragment(
ImportHttpTtsDialog(it.second, true)
)
} }
} }
viewModel.errorLive.observe(this) { viewModel.errorLive.observe(this) {
@@ -88,7 +88,7 @@ class OnLineImportViewModel(app: Application) : BaseAssociationViewModel(app) {
json.contains("name") && json.contains("rule") -> json.contains("name") && json.contains("rule") ->
importTextTocRule(json, finally) importTextTocRule(json, finally)
json.contains("name") && json.contains("url") -> json.contains("name") && json.contains("url") ->
importHttpTTS(json, finally) successLive.postValue(Pair("httpTts", json))
else -> errorLive.postValue("格式不对") else -> errorLive.postValue("格式不对")
} }
} }