Fix TV index not being sorted
This commit is contained in:
parent
5460b73230
commit
717c661c75
@ -322,11 +322,15 @@ struct ShowIndex(DynamicInput<Option<Show>>);
|
|||||||
impl Rule for ShowIndex {
|
impl Rule for ShowIndex {
|
||||||
type Output = Vec<ShowIndexEntry>;
|
type Output = Vec<ShowIndexEntry>;
|
||||||
fn evaluate(&mut self) -> Self::Output {
|
fn evaluate(&mut self) -> Self::Output {
|
||||||
self.input_0()
|
let mut entries = self
|
||||||
|
.input_0()
|
||||||
.inputs
|
.inputs
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|inp| inp.value().as_ref().map(ShowIndexEntry::new))
|
.flat_map(|inp| inp.value().as_ref().map(ShowIndexEntry::new))
|
||||||
.collect()
|
.collect::<Vec<_>>();
|
||||||
|
entries.sort_by_key(|e| e.last_updated);
|
||||||
|
entries.reverse();
|
||||||
|
entries
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user