create clones of arraylists at updating thumbnails
This commit is contained in:
parent
6ac6109d5e
commit
bef5474182
2 changed files with 2 additions and 2 deletions
|
@ -317,7 +317,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList<Direc
|
||||||
fun updateDirs(newDirs: ArrayList<Directory>) {
|
fun updateDirs(newDirs: ArrayList<Directory>) {
|
||||||
if (newDirs.hashCode() != currentDirectoriesHash) {
|
if (newDirs.hashCode() != currentDirectoriesHash) {
|
||||||
currentDirectoriesHash = newDirs.hashCode()
|
currentDirectoriesHash = newDirs.hashCode()
|
||||||
dirs = newDirs
|
dirs = newDirs.clone() as ArrayList<Directory>
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
finishActMode()
|
finishActMode()
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,7 @@ 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()
|
||||||
media = newMedia
|
media = newMedia.clone() as ArrayList<Medium>
|
||||||
enableInstantLoad()
|
enableInstantLoad()
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
finishActMode()
|
finishActMode()
|
||||||
|
|
Loading…
Reference in a new issue