From 36dec5e004eeb8e80e0d2e9d3f622a24644e3bcf Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 May 2019 23:58:47 +0200 Subject: [PATCH] stop loading fullscreen glide view on destroy --- .../gallery/pro/fragments/PhotoFragment.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index 4a25ea30c..25dd5a899 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -21,6 +21,7 @@ import android.view.ViewGroup import com.alexvasilkov.gestures.GestureController import com.alexvasilkov.gestures.State import com.bumptech.glide.Glide +import com.bumptech.glide.Priority import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.DecodeFormat import com.bumptech.glide.load.engine.DiskCacheStrategy @@ -228,6 +229,13 @@ class PhotoFragment : ViewPagerFragment() { mView.subsampling_view.recycle() } + try { + if (context != null) { + Glide.with(context!!).clear(mView.gestures_view) + } + } catch (ignored: Exception) { + } + mLoadZoomableViewHandler.removeCallbacksAndMessages(null) if (mCurrentRotationDegrees != 0) { Thread {