diff --git a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleActivity.kt index d048b1264..9596b78c8 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleActivity.kt @@ -51,18 +51,10 @@ class ImportReplaceRuleActivity : viewModel.import(it) return } - intent.getStringExtra("filePath")?.let { - viewModel.importFromFilePath(it) - return - } intent.data?.let { when (it.path) { "/importonline" -> it.getQueryParameter("src")?.let { url -> - if (url.startsWith("http", false)) { - viewModel.import(url) - } else { - viewModel.importFromFilePath(url) - } + viewModel.import(url) } else -> { binding.rotateLoading.hide() diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt index 3a8efd37b..a3fa20cee 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt @@ -51,18 +51,10 @@ class ImportRssSourceActivity : viewModel.importSource(it) return } - intent.getStringExtra("filePath")?.let { - viewModel.importSourceFromFilePath(it) - return - } intent.data?.let { when (it.path) { "/importonline" -> it.getQueryParameter("src")?.let { url -> - if (url.startsWith("http", false)) { - viewModel.importSource(url) - } else { - viewModel.importSourceFromFilePath(url) - } + viewModel.importSource(url) } else -> { binding.rotateLoading.hide()