From dbe97f564ea5e0e907baf778e6901c1d55ed100e Mon Sep 17 00:00:00 2001 From: davidoskky Date: Fri, 11 Nov 2022 09:40:36 +0100 Subject: [PATCH] Revert imageview changes --- .../readerforselfossv2/android/fragments/ImageFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt index c83d60e..129f883 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/fragments/ImageFragment.kt @@ -7,10 +7,13 @@ import android.view.ViewGroup import androidx.fragment.app.Fragment import bou.amine.apps.readerforselfossv2.android.databinding.FragmentImageBinding import com.bumptech.glide.Glide +import com.bumptech.glide.load.engine.DiskCacheStrategy +import com.bumptech.glide.request.RequestOptions class ImageFragment : Fragment() { private lateinit var imageUrl : String + private val glideOptions = RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.ALL) private var _binding: FragmentImageBinding? = null private val binding get() = _binding @@ -26,6 +29,8 @@ class ImageFragment : Fragment() { binding!!.photoView.visibility = View.VISIBLE Glide.with(activity) + .asBitmap() + .apply(glideOptions) .load(imageUrl) .into(binding!!.photoView)