diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 20e7802d7..2db143623 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -317,7 +317,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: MutableList) { if (newDirs.hashCode() != currentDirectoriesHash) { currentDirectoriesHash = newDirs.hashCode() - dirs = newDirs + dirs = newDirs.clone() as ArrayList notifyDataSetChanged() finishActMode() } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index 2fa48aca4..1b0dfd8c3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -256,7 +256,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, fun updateMedia(newMedia: ArrayList) { if (newMedia.hashCode() != currentMediaHash) { currentMediaHash = newMedia.hashCode() - media = newMedia + media = newMedia.clone() as ArrayList enableInstantLoad() notifyDataSetChanged() finishActMode()