mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #381, handle media pick intents in Show All Folders content view
This commit is contained in:
@@ -252,9 +252,14 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
config.showAll = true
|
||||
Intent(this, MediaActivity::class.java).apply {
|
||||
putExtra(DIRECTORY, "/")
|
||||
startActivity(this)
|
||||
|
||||
if (mIsThirdPartyIntent) {
|
||||
handleMediaIntent(this)
|
||||
} else {
|
||||
startActivity(this)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
finish()
|
||||
}
|
||||
|
||||
private fun changeViewType() {
|
||||
@@ -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)
|
||||
|
Reference in New Issue
Block a user