mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
properly load content:// uris at PhotoFragment
This commit is contained in:
parent
d647bbb583
commit
5505594c29
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue