create clones of arraylists at updating thumbnails

This commit is contained in:
tibbi 2018-03-30 21:36:57 +02:00
parent 6ac6109d5e
commit bef5474182
2 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
fun updateDirs(newDirs: ArrayList<Directory>) {
if (newDirs.hashCode() != currentDirectoriesHash) {
currentDirectoriesHash = newDirs.hashCode()
dirs = newDirs
dirs = newDirs.clone() as ArrayList<Directory>
notifyDataSetChanged()
finishActMode()
}

View File

@ -256,7 +256,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Medium>,
fun updateMedia(newMedia: ArrayList<Medium>) {
if (newMedia.hashCode() != currentMediaHash) {
currentMediaHash = newMedia.hashCode()
media = newMedia
media = newMedia.clone() as ArrayList<Medium>
enableInstantLoad()
notifyDataSetChanged()
finishActMode()