From 6e01ea338630a3dbfbcc003e688f58d721fb675f Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 2 Jul 2019 20:52:17 +0200 Subject: [PATCH] do not allow batch deleting locked folders, only one --- .../gallery/pro/adapters/DirectoryAdapter.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 5a1e56edd..e09546846 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -487,7 +487,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList(selectedKeys.size) + var foldersToDelete = ArrayList(selectedKeys.size) selectedDirs.forEach { if (it.areFavorites() || it.isRecycleBin()) { if (it.isRecycleBin()) { @@ -507,7 +507,14 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList + listener?.deleteFolders(foldersToDelete) + } } }