do not allow batch deleting locked folders, only one
This commit is contained in:
parent
505b925ed8
commit
6e01ea3386
1 changed files with 9 additions and 2 deletions
|
@ -487,7 +487,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
}
|
||||
|
||||
activity.handleSAFDialog(SAFPath) {
|
||||
val foldersToDelete = ArrayList<File>(selectedKeys.size)
|
||||
var foldersToDelete = ArrayList<File>(selectedKeys.size)
|
||||
selectedDirs.forEach {
|
||||
if (it.areFavorites() || it.isRecycleBin()) {
|
||||
if (it.isRecycleBin()) {
|
||||
|
@ -507,8 +507,15 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
}
|
||||
}
|
||||
|
||||
if (foldersToDelete.size == 1) {
|
||||
activity.handleLockedFolderOpening(foldersToDelete.first().absolutePath) {
|
||||
listener?.deleteFolders(foldersToDelete)
|
||||
}
|
||||
} else {
|
||||
foldersToDelete = foldersToDelete.filter { !activity.config.isFolderProtected(it.absolutePath) }.toMutableList() as ArrayList<File>
|
||||
listener?.deleteFolders(foldersToDelete)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun tryChangeAlbumCover(useDefault: Boolean) {
|
||||
|
|
Loading…
Reference in a new issue