mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fixing a crash at checking image load fail reason
This commit is contained in:
@ -255,7 +255,7 @@ class PhotoFragment : ViewPagerFragment() {
|
|||||||
.apply(options)
|
.apply(options)
|
||||||
.listener(object : RequestListener<Bitmap> {
|
.listener(object : RequestListener<Bitmap> {
|
||||||
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean): Boolean {
|
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Bitmap>?, isFirstResource: Boolean): Boolean {
|
||||||
if (!useHalfResolution && e?.rootCauses?.first() is OutOfMemoryError) {
|
if (!useHalfResolution && e?.rootCauses?.firstOrNull() is OutOfMemoryError) {
|
||||||
useHalfResolution = true
|
useHalfResolution = true
|
||||||
Handler().post {
|
Handler().post {
|
||||||
loadBitmap(degrees)
|
loadBitmap(degrees)
|
||||||
|
Reference in New Issue
Block a user