adding a crashfix at loading fullscreen images

This commit is contained in:
tibbi 2018-08-21 10:18:57 +02:00
parent d4a929dbd2
commit 27fb0404ca
1 changed files with 4 additions and 2 deletions

View File

@ -296,7 +296,9 @@ class PhotoFragment : ViewPagerFragment() {
}
override fun onError(e: Exception) {
tryLoadingWithGlide()
if (context != null) {
tryLoadingWithGlide()
}
}
})
} catch (ignored: Exception) {
@ -318,7 +320,7 @@ class PhotoFragment : ViewPagerFragment() {
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.override(targetWidth, targetHeight)
Glide.with(this)
Glide.with(context!!)
.asBitmap()
.load(getPathToLoad(medium))
.apply(options)