Skip to content

Commit 253db88

Browse files
committed
allow creating file shortcuts too
1 parent ffa691e commit 253db88

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import com.simplemobiletools.filemanager.pro.BuildConfig
2323
import com.simplemobiletools.filemanager.pro.R
2424
import com.simplemobiletools.filemanager.pro.dialogs.ChangeSortingDialog
2525
import com.simplemobiletools.filemanager.pro.extensions.config
26+
import com.simplemobiletools.filemanager.pro.extensions.tryOpenPathIntent
2627
import com.simplemobiletools.filemanager.pro.fragments.ItemsFragment
2728
import com.simplemobiletools.filemanager.pro.helpers.RootHelpers
2829
import com.stericson.RootTools.RootTools
@@ -202,6 +203,10 @@ class MainActivity : SimpleActivity() {
202203
openPath(config.homeFolder)
203204
}
204205
}
206+
207+
if (!File(data.path).isDirectory) {
208+
tryOpenPathIntent(data.path, false)
209+
}
205210
} else {
206211
openPath(config.homeFolder)
207212
}

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ItemsAdapter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
7777
findItem(R.id.cab_open_with).isVisible = isOneFileSelected()
7878
findItem(R.id.cab_open_as).isVisible = isOneFileSelected()
7979
findItem(R.id.cab_set_as).isVisible = isOneFileSelected()
80-
findItem(R.id.cab_create_shortcut).isVisible = isNougatMR1Plus() && isOneItemSelected() && File(getFirstSelectedItemPath()).isDirectory
80+
findItem(R.id.cab_create_shortcut).isVisible = isNougatMR1Plus() && isOneItemSelected()
8181

8282
checkHideBtnVisibility(this)
8383
}

0 commit comments

Comments
 (0)