mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
delay updating media adapter a bit
This commit is contained in:
parent
1a3ddab3ca
commit
2a1484f28e
1 changed files with 6 additions and 4 deletions
|
@ -259,10 +259,12 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
|
|||
fun updateMedia(newMedia: ArrayList<Medium>) {
|
||||
if (newMedia.hashCode() != currentMediaHash) {
|
||||
currentMediaHash = newMedia.hashCode()
|
||||
Handler().postDelayed({
|
||||
media = newMedia.clone() as ArrayList<Medium>
|
||||
enableInstantLoad()
|
||||
notifyDataSetChanged()
|
||||
finishActMode()
|
||||
}, 100L)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue