Filter out videos from gallery example
This commit is contained in:
parent
44e68aa4b6
commit
42d592d87b
2 changed files with 13 additions and 2 deletions
|
|
@ -256,7 +256,14 @@ impl Gallery {
|
|||
self.now,
|
||||
)
|
||||
})
|
||||
.chain((self.images.len()..=Image::LIMIT).map(|_| placeholder()));
|
||||
.chain(
|
||||
if self.images.is_empty() {
|
||||
0..Image::LIMIT
|
||||
} else {
|
||||
0..0
|
||||
}
|
||||
.map(|_| placeholder()),
|
||||
);
|
||||
|
||||
let gallery = grid(images)
|
||||
.fluid(Preview::WIDTH)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue