mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	allow deleting folders if some are selected
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user