From 8ea1b02e0fc8c6fd0b167ffb770f122a22b8568d Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 16 Mar 2017 19:13:02 +0100 Subject: [PATCH] stop loading the fullscreen images if the view is destroyed --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index 18f0e251b..b99e1b0b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -143,6 +143,11 @@ class PhotoFragment : ViewPagerFragment() { loadBitmap(degrees) } + override fun onDestroyView() { + super.onDestroyView() + Glide.clear(view) + } + override fun onConfigurationChanged(newConfig: Configuration?) { super.onConfigurationChanged(newConfig) loadImage()