From 345af31cd00a6e499fa731dd765f532f30b96b1c Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 15 Feb 2018 15:51:11 +0100 Subject: [PATCH] allow setting an OTG folder as the home folder --- app/build.gradle | 2 +- .../filemanager/adapters/ItemsAdapter.kt | 18 ++++++------------ .../filemanager/helpers/Config.kt | 13 +++++++++---- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e1783cac..d578a8a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.11.36' + implementation 'com.simplemobiletools:commons:3.11.38' implementation files('../libs/RootTools.jar') diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index 5a98e1ff..721e464b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -68,6 +68,10 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList confirmSelection() R.id.cab_rename -> displayRenameDialog() @@ -176,7 +180,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList() - selectedPositions.forEach { files.add(FileDirItem(fileDirItems[it].path, fileDirItems[it].name)) } + selectedPositions.forEach { fileDirItems[it] } val source = if (!files[0].isDirectory) File(files[0].path).parent else files[0].path FilePickerDialog(activity, source, false, activity.config.shouldShowHidden, true) { @@ -215,9 +219,6 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList(selectedPositions.size) val removeFiles = ArrayList(selectedPositions.size) val SAFPath = fileDirItems[selectedPositions.first()].path @@ -361,7 +355,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList