use the new way of deleting even less

This commit is contained in:
tibbi 2021-10-10 13:11:54 +02:00
parent 511f080d67
commit bdc58fcbbc

View file

@ -629,16 +629,6 @@ fun BaseSimpleActivity.deleteFileBg(fileDirItem: FileDirItem, allowDeleteFolder:
}
}
} else {
if (isRPlus()) {
val fileUris = getFileUrisFromFileDirItems(arrayListOf(fileDirItem))
deleteSDK30Uris(fileUris) { success ->
runOnUiThread {
callback?.invoke(success)
}
}
return
}
if (getIsPathDirectory(file.absolutePath) && allowDeleteFolder) {
fileDeleted = deleteRecursively(file)
}
@ -650,6 +640,13 @@ fun BaseSimpleActivity.deleteFileBg(fileDirItem: FileDirItem, allowDeleteFolder:
trySAFFileDelete(fileDirItem, allowDeleteFolder, callback)
}
}
} else if (isRPlus()) {
val fileUris = getFileUrisFromFileDirItems(arrayListOf(fileDirItem))
deleteSDK30Uris(fileUris) { success ->
runOnUiThread {
callback?.invoke(success)
}
}
}
}
}