From eb08fd76ffbb5f16c5644547aaaa9e7f1249ee4d Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 21 May 2023 18:52:29 +0530 Subject: spice up ui --- src/manager.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/manager.rs') diff --git a/src/manager.rs b/src/manager.rs index 74f449b..34e19be 100644 --- a/src/manager.rs +++ b/src/manager.rs @@ -46,7 +46,9 @@ impl Manager { } pub fn list_feeds(&self) -> impl Iterator { - self.feeds.iter() + let mut ordered: Vec<&Feed> = self.feeds.iter().collect(); + ordered.sort_by(|a, b| b.last_updated().cmp(&a.last_updated())); + ordered.into_iter() } pub fn store(&self) -> Result { -- cgit v1.2.3