From 6a4ae2aba8d91c8b39f042a7e5e9f719ec0ae89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sat, 10 Dec 2022 23:55:07 +0100 Subject: [PATCH] Sort feeds after when added instead of alphabetical --- discord_rss_bot/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord_rss_bot/main.py b/discord_rss_bot/main.py index 6a2a091..c8e86d9 100644 --- a/discord_rss_bot/main.py +++ b/discord_rss_bot/main.py @@ -192,8 +192,8 @@ def make_context_index(request) -> dict: hook = reader.get_tag(feed.url, "webhook") feed_list.append({"feed": feed, "webhook": hook}) - # Sort feed_list by feed url - feed_list.sort(key=lambda x: x["feed"].url) + # Sort feed_list by when the feed was added. + feed_list.sort(key=lambda x: x["feed"].added) feed_count: FeedCounts = reader.get_feed_counts() entry_count: EntryCounts = reader.get_entry_counts()