fix:不下载验证码图片

pull/1852/head
Xwite 3 years ago
parent b2a4a73acb
commit ef9391b137
  1. 7
      app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt
  2. 7
      app/src/main/res/layout/dialog_verification_code_view.xml

@ -7,6 +7,7 @@ import android.view.ViewGroup
import android.view.MenuItem
import androidx.appcompat.widget.Toolbar
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.load.engine.DiskCacheStrategy
import io.legado.app.R
import io.legado.app.base.BaseDialogFragment
import io.legado.app.databinding.DialogVerificationCodeViewBinding
@ -46,7 +47,6 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification
binding.run {
toolBar.setBackgroundColor(primaryColor)
val sourceOrigin = arguments?.getString("sourceOrigin")
val key = "${sourceOrigin}_verificationResult"
arguments?.getString("imageUrl")?.let { imageUrl ->
ImageLoader.load(requireContext(), imageUrl).apply {
sourceOrigin?.let {
@ -58,8 +58,9 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification
)
}
}.error(R.drawable.image_loading_error)
.into(ivImage)
ivImage.setOnClickListener {
.diskCacheStrategy(DiskCacheStrategy.NONE)
.into(verificationCodeImageView)
verificationCodeImageView.setOnClickListener {
showDialogFragment(PhotoDialog(imageUrl, sourceOrigin))
}
}

@ -18,11 +18,10 @@
app:titleTextAppearance="@style/ToolbarTitle" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_image"
android:scaleType="fitXY"
android:id="@+id/verification_code_image_view"
android:layout_width="match_parent"
android:layout_height="50dp"
android:padding="3dp"
android:layout_height="100dp"
android:scaleType="centerCrop"
android:background="?android:attr/selectableItemBackgroundBorderless"
tools:ignore="UnusedAttribute" />

Loading…
Cancel
Save