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)