properly load content:// uris at PhotoFragment

This commit is contained in:
tibbi 2018-08-08 22:53:09 +02:00
parent d647bbb583
commit 5505594c29

View file

@ -265,8 +265,9 @@ class PhotoFragment : ViewPagerFragment() {
targetHeight = (targetHeight * 0.8).toInt() targetHeight = (targetHeight * 0.8).toInt()
} }
val pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}"
val picasso = Picasso.get() val picasso = Picasso.get()
.load(File(medium.path)) .load(pathToLoad)
.centerInside() .centerInside()
.resize(targetWidth, targetHeight) .resize(targetWidth, targetHeight)