diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt index df76a4ae..dd0fbc2f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/activities/MainActivity.kt @@ -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() diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CreateNewItemDialog.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CreateNewItemDialog.kt index dd069a52..f37d6dbf 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CreateNewItemDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CreateNewItemDialog.kt @@ -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