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 b039d8c35..9d65718ad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -228,6 +228,9 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList() val positions = multiSelector.selectedPositions + if (positions.isEmpty()) + return + positions.forEach { val dir = File(dirs[it].path) files.addAll(dir.listFiles().filter { it.isFile && it.isImageVideoGif() })