allow creating file shortcuts too
This commit is contained in:
parent
ffa691eb4c
commit
253db88d0d
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
|
|||
findItem(R.id.cab_open_with).isVisible = isOneFileSelected()
|
||||
findItem(R.id.cab_open_as).isVisible = isOneFileSelected()
|
||||
findItem(R.id.cab_set_as).isVisible = isOneFileSelected()
|
||||
findItem(R.id.cab_create_shortcut).isVisible = isNougatMR1Plus() && isOneItemSelected() && File(getFirstSelectedItemPath()).isDirectory
|
||||
findItem(R.id.cab_create_shortcut).isVisible = isNougatMR1Plus() && isOneItemSelected()
|
||||
|
||||
checkHideBtnVisibility(this)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue