From 95638ab95cdbc2d157d377edf78f9894f9320482 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 22 Jul 2021 23:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=AF=BC=E5=85=A5=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 12 +++--------- .../ui/association/ImportBookSourceActivity.kt | 15 +-------------- .../ui/association/ImportReplaceRuleActivity.kt | 14 +------------- .../app/ui/association/ImportRssSourceActivity.kt | 15 +-------------- 4 files changed, 6 insertions(+), 50 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2da0a69a1..5edd914e6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -350,23 +350,17 @@ - - + android:theme="@style/AppTheme.Transparent" /> - - + android:theme="@style/AppTheme.Transparent" /> - - + android:theme="@style/AppTheme.Transparent" /> it.getQueryParameter("src")?.let { url -> - viewModel.importSource(url) - } - else -> { - binding.rotateLoading.hide() - toastOnUi(R.string.wrong_format) - finish() - } - } - } ?: finish() + finish() } private fun errorDialog(msg: String) { 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 d01b49f26..a202a03e9 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 @@ -7,7 +7,6 @@ import io.legado.app.constant.Theme import io.legado.app.databinding.ActivityTranslucenceBinding import io.legado.app.help.IntentDataHelp import io.legado.app.lib.dialogs.alert -import io.legado.app.utils.toastOnUi import io.legado.app.utils.viewbindingdelegate.viewBinding class ImportReplaceRuleActivity : @@ -46,18 +45,7 @@ class ImportReplaceRuleActivity : viewModel.import(it) return } - intent.data?.let { - when (it.path) { - "/importonline" -> it.getQueryParameter("src")?.let { url -> - viewModel.import(url) - } - else -> { - binding.rotateLoading.hide() - toastOnUi("格式不对") - finish() - } - } - } ?: finish() + finish() } private fun errorDialog(msg: String) { 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 7a2cfe9d9..a7a82a2cb 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 @@ -8,8 +8,6 @@ import io.legado.app.constant.Theme import io.legado.app.databinding.ActivityTranslucenceBinding import io.legado.app.help.IntentDataHelp import io.legado.app.lib.dialogs.alert - -import io.legado.app.utils.toastOnUi import io.legado.app.utils.viewbindingdelegate.viewBinding class ImportRssSourceActivity : @@ -48,18 +46,7 @@ class ImportRssSourceActivity : viewModel.importSource(it) return } - intent.data?.let { - when (it.path) { - "/importonline" -> it.getQueryParameter("src")?.let { url -> - viewModel.importSource(url) - } - else -> { - binding.rotateLoading.hide() - toastOnUi(R.string.wrong_format) - finish() - } - } - } ?: finish() + finish() } private fun errorDialog(msg: String) {