diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt index 92579a091..049bdd2d5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt @@ -604,8 +604,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener { ensureBackgroundThread { val oldMedia = mMedia.clone() as ArrayList val newMedia = it - gotMedia(newMedia, false) try { + gotMedia(newMedia, false) oldMedia.filter { !newMedia.contains(it) }.mapNotNull { it as? Medium }.filter { !File(it.path).exists() }.forEach { mMediumDao.deleteMediumPath(it.path) } diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 538b3ecb8..87c97c00b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -193,8 +193,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList