Merge pull request #339 from Gan0k/fix_jellybean_crash
Fixes Crash on Android API 16 (Jelly Bean)
This commit is contained in:
commit
cb27ba4ec8
|
@ -1,6 +1,7 @@
|
|||
package com.simplemobiletools.gallery.adapters
|
||||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Build
|
||||
import android.support.v7.view.ActionMode
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.util.SparseArray
|
||||
|
@ -430,8 +431,10 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
|
|||
}
|
||||
|
||||
fun stopLoad() {
|
||||
if (!activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.dir_thumbnail)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && activity.isDestroyed)
|
||||
return
|
||||
|
||||
Glide.with(activity).clear(view.dir_thumbnail)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.simplemobiletools.gallery.adapters
|
||||
|
||||
import android.graphics.PorterDuff
|
||||
import android.os.Build
|
||||
import android.support.v7.view.ActionMode
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.util.SparseArray
|
||||
|
@ -347,8 +348,10 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
|
|||
}
|
||||
|
||||
fun stopLoad() {
|
||||
if (!activity.isDestroyed)
|
||||
Glide.with(activity).clear(view.medium_thumbnail)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && activity.isDestroyed)
|
||||
return
|
||||
|
||||
Glide.with(activity).clear(view.medium_thumbnail)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue