mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 04:20:38 +01:00
delay updating media adapter a bit
This commit is contained in:
parent
1a3ddab3ca
commit
2a1484f28e
@ -259,10 +259,12 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||||||
fun updateMedia(newMedia: ArrayList<Medium>) {
|
fun updateMedia(newMedia: ArrayList<Medium>) {
|
||||||
if (newMedia.hashCode() != currentMediaHash) {
|
if (newMedia.hashCode() != currentMediaHash) {
|
||||||
currentMediaHash = newMedia.hashCode()
|
currentMediaHash = newMedia.hashCode()
|
||||||
|
Handler().postDelayed({
|
||||||
media = newMedia.clone() as ArrayList<Medium>
|
media = newMedia.clone() as ArrayList<Medium>
|
||||||
enableInstantLoad()
|
enableInstantLoad()
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
finishActMode()
|
finishActMode()
|
||||||
|
}, 100L)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user