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

View file

@ -296,8 +296,10 @@ class PhotoFragment : ViewPagerFragment() {
} }
override fun onError(e: Exception) { override fun onError(e: Exception) {
if (context != null) {
tryLoadingWithGlide() 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)