pull/2189/head
kunfei 2 years ago
parent e7fd8a536a
commit 6cef2f5a5d
  1. 1
      app/src/main/java/io/legado/app/help/SourceVerificationHelp.kt
  2. 2
      app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt
  3. 1
      app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt
  4. 7
      app/src/main/res/layout/dialog_verification_code_view.xml

@ -59,6 +59,7 @@ object SourceVerificationHelp {
putExtra("title", title) putExtra("title", title)
putExtra("url", url) putExtra("url", url)
putExtra("sourceOrigin", source.getKey()) putExtra("sourceOrigin", source.getKey())
putExtra("sourceName", source.getTag())
putExtra("sourceVerificationEnable", saveResult) putExtra("sourceVerificationEnable", saveResult)
IntentData.put(url, source.getHeaderMap(true)) IntentData.put(url, source.getHeaderMap(true))
} }

@ -56,7 +56,7 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification
binding.run { binding.run {
toolBar.setBackgroundColor(primaryColor) toolBar.setBackgroundColor(primaryColor)
arguments?.let { arguments -> arguments?.let { arguments ->
tvTag.text = arguments.getString("sourceName") toolBar.subtitle = arguments.getString("sourceName")
val sourceOrigin = arguments.getString("sourceOrigin") val sourceOrigin = arguments.getString("sourceOrigin")
arguments.getString("imageUrl")?.let { imageUrl -> arguments.getString("imageUrl")?.let { imageUrl ->
ImageLoader.load(requireContext(), imageUrl).apply { ImageLoader.load(requireContext(), imageUrl).apply {

@ -45,6 +45,7 @@ class WebViewActivity : VMBaseActivity<ActivityWebViewBinding, WebViewModel>() {
override fun onActivityCreated(savedInstanceState: Bundle?) { override fun onActivityCreated(savedInstanceState: Bundle?) {
binding.titleBar.title = intent.getStringExtra("title") ?: getString(R.string.loading) binding.titleBar.title = intent.getStringExtra("title") ?: getString(R.string.loading)
binding.titleBar.subtitle = intent.getStringExtra("sourceName")
viewModel.initData(intent) { viewModel.initData(intent) {
val url = viewModel.baseUrl val url = viewModel.baseUrl
val headerMap = viewModel.headerMap val headerMap = viewModel.headerMap

@ -17,13 +17,6 @@
app:title="@string/input_verification_code" app:title="@string/input_verification_code"
app:titleTextAppearance="@style/ToolbarTitle" /> app:titleTextAppearance="@style/ToolbarTitle" />
<TextView
android:id="@+id/tv_tag"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/secondaryText"
android:visibility="gone" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/verification_code_image_view" android:id="@+id/verification_code_image_view"
android:layout_width="match_parent" android:layout_width="match_parent"

Loading…
Cancel
Save