Skip to content

Commit 4202d90

Browse files
committed
allow deleting folders if some are selected
1 parent 2df4979 commit 4202d90

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232
}
3333

3434
dependencies {
35-
compile 'com.simplemobiletools:commons:2.11.5'
35+
compile 'com.simplemobiletools:commons:2.11.6'
3636
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
3737
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
3838
}

app/src/main/kotlin/com/simplemobiletools/filemanager/fragments/ItemsFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
189189
}
190190

191191
override fun deleteFiles(files: ArrayList<File>) {
192-
(activity as SimpleActivity).deleteFiles(files) {
192+
val hasFolder = files.any { it.isDirectory }
193+
(activity as SimpleActivity).deleteFiles(files, hasFolder) {
193194
if (!it) {
194195
activity.runOnUiThread {
195196
activity.toast(R.string.unknown_error_occurred)

0 commit comments

Comments
 (0)