Merge pull request #1639 from Naveen3Singh/fix_no_media_deletion
Delete hidden files using casual method
This commit is contained in:
commit
136962b0cd
1 changed files with 4 additions and 3 deletions
|
@ -702,18 +702,19 @@ fun BaseSimpleActivity.deleteFilesBg(files: List<FileDirItem>, allowDeleteFolder
|
|||
}
|
||||
|
||||
val firstFile = files.first()
|
||||
handleSAFDialog(firstFile.path) {
|
||||
val firstFilePath = firstFile.path
|
||||
handleSAFDialog(firstFilePath) {
|
||||
if (!it) {
|
||||
return@handleSAFDialog
|
||||
}
|
||||
|
||||
checkManageMediaOrHandleSAFDialogSdk30(firstFile.path) {
|
||||
checkManageMediaOrHandleSAFDialogSdk30(firstFilePath) {
|
||||
if (!it) {
|
||||
return@checkManageMediaOrHandleSAFDialogSdk30
|
||||
}
|
||||
|
||||
val recycleBinPath = firstFile.isRecycleBinPath(this)
|
||||
if (canManageMedia() && !recycleBinPath) {
|
||||
if (canManageMedia() && !recycleBinPath && !firstFilePath.doesThisOrParentHaveNoMedia(HashMap(), null)) {
|
||||
val fileUris = getFileUrisFromFileDirItems(files)
|
||||
|
||||
deleteSDK30Uris(fileUris) { success ->
|
||||
|
|
Loading…
Reference in a new issue