properly show OTG subfolder thumbnails
This commit is contained in:
parent
771e59b5cf
commit
a0bdc0b46b
2 changed files with 23 additions and 16 deletions
|
@ -425,13 +425,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun hideFolder() {
|
||||
addNoMedia(mPath) {
|
||||
runOnUiThread {
|
||||
if (!config.shouldShowHidden)
|
||||
if (!config.shouldShowHidden) {
|
||||
finish()
|
||||
else
|
||||
} else {
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun unhideFolder() {
|
||||
removeNoMedia(mPath) {
|
||||
|
|
|
@ -75,6 +75,11 @@ class MediaFetcher(val context: Context) {
|
|||
}
|
||||
|
||||
fun getFilesFrom(curPath: String, isPickImage: Boolean, isPickVideo: Boolean): ArrayList<Medium> {
|
||||
if (curPath.startsWith(OTG_PATH)) {
|
||||
val curMedia = ArrayList<Medium>()
|
||||
getMediaOnOTG(curPath, curMedia, isPickImage, isPickVideo, context.config.filterMedia)
|
||||
return curMedia
|
||||
} else {
|
||||
val projection = arrayOf(MediaStore.Images.Media._ID,
|
||||
MediaStore.Images.Media.DISPLAY_NAME,
|
||||
MediaStore.Images.Media.DATE_TAKEN,
|
||||
|
@ -92,6 +97,7 @@ class MediaFetcher(val context: Context) {
|
|||
ArrayList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSelectionQuery(path: String): String? {
|
||||
val dataQuery = "${MediaStore.Images.Media.DATA} LIKE ?"
|
||||
|
|
Loading…
Reference in a new issue