From 5505594c29b6d8fb40af3ad2d948d8e2316016a2 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 8 Aug 2018 22:53:09 +0200 Subject: [PATCH] properly load content:// uris at PhotoFragment --- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 cff43e650..122ed6e6a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -265,8 +265,9 @@ class PhotoFragment : ViewPagerFragment() { targetHeight = (targetHeight * 0.8).toInt() } + val pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}" val picasso = Picasso.get() - .load(File(medium.path)) + .load(pathToLoad) .centerInside() .resize(targetWidth, targetHeight)