Only allow resizing multiple images with common parents
Otherwise we'll have to create multiple SAF dialogs which just isn't practical/tedious for the user. Users can still resize images without common parents if they grant "All Files" access
This commit is contained in:
parent
295793c77f
commit
ad10f4123f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue