From d590ac2dc2ac54f3130c5cffd02ad7636b7be132 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 20 Aug 2018 21:39:04 +0200 Subject: [PATCH] do not use lower resolution images at fullscreen view before adding the zoomable --- .../gallery/fragments/PhotoFragment.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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 59635ce31..1b294d73e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -274,14 +274,6 @@ class PhotoFragment : ViewPagerFragment() { } private fun loadBitmap(degrees: Int = 0) { - var targetWidth = ViewPagerActivity.screenWidth - var targetHeight = ViewPagerActivity.screenHeight - - if (context?.config?.allowZoomingImages == true) { - targetWidth = (targetWidth * 0.8).toInt() - targetHeight = (targetHeight * 0.8).toInt() - } - var pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}" pathToLoad = pathToLoad.replace("%", "%25").replace("#", "%23") @@ -289,7 +281,7 @@ class PhotoFragment : ViewPagerFragment() { val picasso = Picasso.get() .load(pathToLoad) .centerInside() - .resize(targetWidth, targetHeight) + .resize(ViewPagerActivity.screenWidth, ViewPagerActivity.screenHeight) if (degrees != 0) { picasso.rotate(degrees.toFloat())