From 83330cf30dc1b0b98008dddde8efbd1e6101530c Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 24 Jul 2021 13:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 5 -- .../ui/association/ImportRssSourceActivity.kt | 61 ------------------- 2 files changed, 66 deletions(-) delete mode 100644 app/src/main/java/io/legado/app/ui/association/ImportRssSourceActivity.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 990621d22..daebcda88 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -335,11 +335,6 @@ - - ( - theme = Theme.Transparent - ) { - - override val binding by viewBinding(ActivityTranslucenceBinding::inflate) - override val viewModel by viewModels() - - override fun onActivityCreated(savedInstanceState: Bundle?) { - binding.rotateLoading.show() - viewModel.errorLiveData.observe(this, { - binding.rotateLoading.hide() - errorDialog(it) - }) - viewModel.successLiveData.observe(this, { - binding.rotateLoading.hide() - if (it > 0) { - ImportRssSourceDialog().show(supportFragmentManager, "SourceDialog") - } else { - errorDialog(getString(R.string.wrong_format)) - } - }) - initData() - } - - private fun initData() { - intent.getStringExtra("dataKey")?.let { - IntentDataHelp.getData(it)?.let { source -> - viewModel.importSource(source) - return - } - } - intent.getStringExtra("source")?.let { - viewModel.importSource(it) - return - } - finish() - } - - private fun errorDialog(msg: String) { - alert(getString(R.string.error), msg) { - okButton { } - onDismiss { - finish() - } - }.show() - } - -} \ No newline at end of file