From 4c8b7a3c849c5a1af6ea0667b5e1f334973a973c Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 13 May 2019 22:17:37 +0200 Subject: [PATCH] load the initially visible fullscreen image with the highest priority --- .../simplemobiletools/gallery/pro/fragments/PhotoFragment.kt | 2 ++ 1 file changed, 2 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 433a47d1c..4a25ea30c 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 @@ -359,9 +359,11 @@ class PhotoFragment : ViewPagerFragment() { } private fun loadBitmap(addZoomableView: Boolean = true) { + val priority = if (mIsFragmentVisible) Priority.IMMEDIATE else Priority.NORMAL val options = RequestOptions() .signature(mMedium.path.getFileSignature()) .format(DecodeFormat.PREFER_ARGB_8888) + .priority(priority) .diskCacheStrategy(DiskCacheStrategy.RESOURCE) .fitCenter()