mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-17 22:08:00 +01:00
filter out videos from directory cover images immediately
This commit is contained in:
parent
ebe0ed68fd
commit
906168c6b5
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,8 @@ class PickMediumDialog(val activity: SimpleActivity, val path: String, val callb
|
|||
activity.setupDialogStuff(view, this, R.string.select_photo)
|
||||
|
||||
val token = object : TypeToken<List<Medium>>() {}.type
|
||||
val media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList(1)
|
||||
var media = Gson().fromJson<ArrayList<Medium>>(activity.config.loadFolderMedia(path), token) ?: ArrayList(1)
|
||||
media = media.filter { !it.video } as ArrayList
|
||||
|
||||
if (media.isNotEmpty()) {
|
||||
gotMedia(media)
|
||||
|
|
Loading…
Reference in a new issue