mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-11 16:15:25 +01:00
adding a crashfix at loading fullscreen images
This commit is contained in:
parent
d4a929dbd2
commit
27fb0404ca
@ -296,7 +296,9 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(e: Exception) {
|
override fun onError(e: Exception) {
|
||||||
tryLoadingWithGlide()
|
if (context != null) {
|
||||||
|
tryLoadingWithGlide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (ignored: Exception) {
|
} catch (ignored: Exception) {
|
||||||
@ -318,7 +320,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
.override(targetWidth, targetHeight)
|
.override(targetWidth, targetHeight)
|
||||||
|
|
||||||
Glide.with(this)
|
Glide.with(context!!)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
.load(getPathToLoad(medium))
|
.load(getPathToLoad(medium))
|
||||||
.apply(options)
|
.apply(options)
|
||||||
|
Loading…
Reference in New Issue
Block a user