allow deleting folders if some are selected
This commit is contained in:
parent
2df4979dd5
commit
4202d9035c
|
@ -32,7 +32,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.simplemobiletools:commons:2.11.5'
|
||||
compile 'com.simplemobiletools:commons:2.11.6'
|
||||
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
|
|
@ -189,7 +189,8 @@ class ItemsFragment : android.support.v4.app.Fragment(), ItemsAdapter.ItemOperat
|
|||
}
|
||||
|
||||
override fun deleteFiles(files: ArrayList<File>) {
|
||||
(activity as SimpleActivity).deleteFiles(files) {
|
||||
val hasFolder = files.any { it.isDirectory }
|
||||
(activity as SimpleActivity).deleteFiles(files, hasFolder) {
|
||||
if (!it) {
|
||||
activity.runOnUiThread {
|
||||
activity.toast(R.string.unknown_error_occurred)
|
||||
|
|
Loading…
Reference in New Issue