mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
wrap whole picasso loading in a try/catch block
This commit is contained in:
@ -267,6 +267,8 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
|
||||
var pathToLoad = if (medium.path.startsWith("content://")) medium.path else "file://${medium.path}"
|
||||
pathToLoad = pathToLoad.replace("%", "%25").replace("#", "%23")
|
||||
|
||||
try {
|
||||
val picasso = Picasso.get()
|
||||
.load(pathToLoad)
|
||||
.centerInside()
|
||||
@ -286,6 +288,8 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
|
||||
override fun onError(e: Exception) {}
|
||||
})
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun openPanorama() {
|
||||
|
Reference in New Issue
Block a user