mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-07 15:48:52 +01:00
fix displaying fullscreen images containing percentage sign or hashtag
This commit is contained in:
parent
f95da6b83a
commit
fe69c09915
@ -10,7 +10,8 @@ class PicassoRegionDecoder : ImageRegionDecoder {
|
|||||||
private val decoderLock = Any()
|
private val decoderLock = Any()
|
||||||
|
|
||||||
override fun init(context: Context, uri: Uri): Point {
|
override fun init(context: Context, uri: Uri): Point {
|
||||||
val inputStream = context.contentResolver.openInputStream(uri)
|
val newUri = Uri.parse(uri.toString().replace("%", "%25").replace("#", "%23"))
|
||||||
|
val inputStream = context.contentResolver.openInputStream(newUri)
|
||||||
decoder = BitmapRegionDecoder.newInstance(inputStream, false)
|
decoder = BitmapRegionDecoder.newInstance(inputStream, false)
|
||||||
return Point(decoder!!.width, decoder!!.height)
|
return Point(decoder!!.width, decoder!!.height)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user