From 253db88d0d6519bf6f89074d463f63acc67d14c9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 3 May 2019 19:16:17 +0200 Subject: [PATCH] allow creating file shortcuts too --- .../filemanager/pro/activities/MainActivity.kt | 5 +++++ .../filemanager/pro/adapters/ItemsAdapter.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index 43c49a71..f1ca9260 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -23,6 +23,7 @@ import com.simplemobiletools.filemanager.pro.BuildConfig import com.simplemobiletools.filemanager.pro.R import com.simplemobiletools.filemanager.pro.dialogs.ChangeSortingDialog import com.simplemobiletools.filemanager.pro.extensions.config +import com.simplemobiletools.filemanager.pro.extensions.tryOpenPathIntent import com.simplemobiletools.filemanager.pro.fragments.ItemsFragment import com.simplemobiletools.filemanager.pro.helpers.RootHelpers import com.stericson.RootTools.RootTools @@ -202,6 +203,10 @@ class MainActivity : SimpleActivity() { openPath(config.homeFolder) } } + + if (!File(data.path).isDirectory) { + tryOpenPathIntent(data.path, false) + } } else { openPath(config.homeFolder) } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt index 37ff2fe5..f71ed6b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt @@ -77,7 +77,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList