From 6cef2f5a5d924b0502a89b4f3fb0a446a2d67f16 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 22 Aug 2022 20:25:33 +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 --- .../main/java/io/legado/app/help/SourceVerificationHelp.kt | 1 + .../io/legado/app/ui/association/VerificationCodeDialog.kt | 2 +- .../main/java/io/legado/app/ui/browser/WebViewActivity.kt | 1 + app/src/main/res/layout/dialog_verification_code_view.xml | 7 ------- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/SourceVerificationHelp.kt b/app/src/main/java/io/legado/app/help/SourceVerificationHelp.kt index 7251225e3..93e6c7e6e 100644 --- a/app/src/main/java/io/legado/app/help/SourceVerificationHelp.kt +++ b/app/src/main/java/io/legado/app/help/SourceVerificationHelp.kt @@ -59,6 +59,7 @@ object SourceVerificationHelp { putExtra("title", title) putExtra("url", url) putExtra("sourceOrigin", source.getKey()) + putExtra("sourceName", source.getTag()) putExtra("sourceVerificationEnable", saveResult) IntentData.put(url, source.getHeaderMap(true)) } diff --git a/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt b/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt index dcf38db7b..c6408ccf6 100644 --- a/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt @@ -56,7 +56,7 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification binding.run { toolBar.setBackgroundColor(primaryColor) arguments?.let { arguments -> - tvTag.text = arguments.getString("sourceName") + toolBar.subtitle = arguments.getString("sourceName") val sourceOrigin = arguments.getString("sourceOrigin") arguments.getString("imageUrl")?.let { imageUrl -> ImageLoader.load(requireContext(), imageUrl).apply { diff --git a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt index f42771a13..4288b2e16 100644 --- a/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt +++ b/app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt @@ -45,6 +45,7 @@ class WebViewActivity : VMBaseActivity() { override fun onActivityCreated(savedInstanceState: Bundle?) { binding.titleBar.title = intent.getStringExtra("title") ?: getString(R.string.loading) + binding.titleBar.subtitle = intent.getStringExtra("sourceName") viewModel.initData(intent) { val url = viewModel.baseUrl val headerMap = viewModel.headerMap diff --git a/app/src/main/res/layout/dialog_verification_code_view.xml b/app/src/main/res/layout/dialog_verification_code_view.xml index ef6ee0c02..fe60e9b1c 100644 --- a/app/src/main/res/layout/dialog_verification_code_view.xml +++ b/app/src/main/res/layout/dialog_verification_code_view.xml @@ -17,13 +17,6 @@ app:title="@string/input_verification_code" app:titleTextAppearance="@style/ToolbarTitle" /> - -