mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	remove some redundant function
This commit is contained in:
		| @@ -66,11 +66,6 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br | ||||
|         mStoredTextColor = config.textColor | ||||
|     } | ||||
|  | ||||
|     override fun onDestroy() { | ||||
|         super.onDestroy() | ||||
|         config.isFirstRun = false | ||||
|     } | ||||
|  | ||||
|     private fun tryInitFileManager() { | ||||
|         if (hasWriteStoragePermission()) { | ||||
|             initRootFileManager() | ||||
|   | ||||
| @@ -6,7 +6,6 @@ import android.view.View | ||||
| import android.view.WindowManager | ||||
| import com.simplemobiletools.commons.extensions.* | ||||
| import com.simplemobiletools.filemanager.R | ||||
| import com.simplemobiletools.filemanager.extensions.config | ||||
| import kotlinx.android.synthetic.main.dialog_create_new.view.* | ||||
| import java.io.File | ||||
| import java.io.IOException | ||||
| @@ -50,7 +49,7 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback | ||||
|  | ||||
|     private fun createDirectory(file: File, alertDialog: AlertDialog): Boolean { | ||||
|         return if (activity.needsStupidWritePermissions(path)) { | ||||
|             val documentFile = activity.getFileDocument(file.absolutePath, activity.config.treeUri) ?: return false | ||||
|             val documentFile = activity.getFileDocument(file.absolutePath) ?: return false | ||||
|             documentFile.createDirectory(file.name) | ||||
|             success(alertDialog) | ||||
|             true | ||||
| @@ -68,7 +67,7 @@ class CreateNewItemDialog(val activity: Activity, val path: String, val callback | ||||
|     private fun createFile(file: File, alertDialog: AlertDialog): Boolean { | ||||
|         try { | ||||
|             if (activity.needsStupidWritePermissions(path)) { | ||||
|                 val documentFile = activity.getFileDocument(file.absolutePath, activity.config.treeUri) ?: return false | ||||
|                 val documentFile = activity.getFileDocument(file.absolutePath) ?: return false | ||||
|                 documentFile.createFile("", file.name) | ||||
|                 success(alertDialog) | ||||
|                 return true | ||||
|   | ||||
		Reference in New Issue
	
	Block a user