mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
create clones of arraylists at updating thumbnails
This commit is contained in:
@ -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()
|
||||||
|
Reference in New Issue
Block a user