mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-19 21:40:37 +01:00
filter out videos from directory cover images immediately
This commit is contained in:
parent
ebe0ed68fd
commit
906168c6b5
@ -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…
x
Reference in New Issue
Block a user