diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 6bdee1414..b906e3745 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -302,9 +302,11 @@ class MediaAdapter( if (!selectionContainsImages) { return false } - val parentPath = selectedItems.first { it.isImage() }.path.getParentPath() + + val parentPath = selectedItems.first { it.isImage() }.parentPath + val isCommonParent = selectedItems.all { parentPath == it.parentPath } val isRestrictedDir = activity.isRestrictedWithSAFSdk30(parentPath) - return !isRestrictedDir + return isExternalStorageManager() || (isCommonParent && !isRestrictedDir) } private fun toggleFileVisibility(hide: Boolean) {