fix #381, handle media pick intents in Show All Folders content view
This commit is contained in:
parent
4203939d62
commit
74edee735a
1 changed files with 12 additions and 2 deletions
|
@ -252,10 +252,15 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
config.showAll = true
|
||||
Intent(this, MediaActivity::class.java).apply {
|
||||
putExtra(DIRECTORY, "/")
|
||||
|
||||
if (mIsThirdPartyIntent) {
|
||||
handleMediaIntent(this)
|
||||
} else {
|
||||
startActivity(this)
|
||||
}
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun changeViewType() {
|
||||
val items = arrayListOf(
|
||||
|
@ -477,7 +482,12 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
private fun itemClicked(path: String) {
|
||||
Intent(this, MediaActivity::class.java).apply {
|
||||
putExtra(DIRECTORY, path)
|
||||
handleMediaIntent(this)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleMediaIntent(intent: Intent) {
|
||||
intent.apply {
|
||||
if (mIsSetWallpaperIntent) {
|
||||
putExtra(SET_WALLPAPER_INTENT, true)
|
||||
startActivityForResult(this, PICK_WALLPAPER)
|
||||
|
|
Loading…
Reference in a new issue