From 4f0c48ec0ffe2e890e6b0ca94fb5a65515023fe7 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 25 Jul 2021 22:51:44 +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 --- .../io/legado/app/ui/association/ImportBookSourceDialog.kt | 2 +- .../io/legado/app/ui/association/ImportReplaceRuleDialog.kt | 3 +-- .../java/io/legado/app/ui/association/ImportRssSourceDialog.kt | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt index 3d12fe06b..905e9d2cb 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt @@ -102,7 +102,6 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList dismissAllowingStateLoss() } } - upSelectText() binding.tvFooterLeft.visible() binding.tvFooterLeft.setOnClickListener { val selectAll = viewModel.isSelectAll() @@ -125,6 +124,7 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList binding.rotateLoading.hide() if (it > 0) { adapter.setItems(viewModel.allSources) + upSelectText() } else { binding.tvMsg.apply { setText(R.string.wrong_format) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleDialog.kt index 435517065..d288427c5 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportReplaceRuleDialog.kt @@ -70,7 +70,6 @@ class ImportReplaceRuleDialog : BaseDialogFragment() { adapter = SourcesAdapter(requireContext()) binding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) binding.recyclerView.adapter = adapter - adapter.setItems(viewModel.allRules) binding.tvCancel.visible() binding.tvCancel.setOnClickListener { dismissAllowingStateLoss() @@ -84,7 +83,6 @@ class ImportReplaceRuleDialog : BaseDialogFragment() { dismissAllowingStateLoss() } } - upSelectText() binding.tvFooterLeft.visible() binding.tvFooterLeft.setOnClickListener { val selectAll = viewModel.isSelectAll() @@ -107,6 +105,7 @@ class ImportReplaceRuleDialog : BaseDialogFragment() { binding.rotateLoading.hide() if (it > 0) { adapter.setItems(viewModel.allRules) + upSelectText() } else { binding.tvMsg.apply { setText(R.string.wrong_format) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt index 821ab2986..a7f450418 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt @@ -86,7 +86,6 @@ class ImportRssSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListe adapter = SourcesAdapter(requireContext()) binding.recyclerView.layoutManager = LinearLayoutManager(requireContext()) binding.recyclerView.adapter = adapter - adapter.setItems(viewModel.allSources) binding.tvCancel.visible() binding.tvCancel.setOnClickListener { dismissAllowingStateLoss() @@ -100,7 +99,6 @@ class ImportRssSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListe dismissAllowingStateLoss() } } - upSelectText() binding.tvFooterLeft.visible() binding.tvFooterLeft.setOnClickListener { val selectAll = viewModel.isSelectAll() @@ -123,6 +121,7 @@ class ImportRssSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListe binding.rotateLoading.hide() if (it > 0) { adapter.setItems(viewModel.allSources) + upSelectText() } else { binding.tvMsg.apply { setText(R.string.wrong_format)