From 2b891ccf2b2959bba4ee6542ae5f80300cfa5593 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 27 Mar 2021 00:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E5=BC=80=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/association/ImportReplaceRuleActivity.kt | 10 +--------- .../app/ui/association/ImportRssSourceActivity.kt | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) 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()