summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-23 11:40:27 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-23 11:40:27 +0200
commit9e3873b94e7ff1bea659d83ce3b12f630766a436 (patch)
treefb5ffa652fa1b3d419b176d41f1a666b9472ea2e /src
parentc0df64db6c13a8880a0d204fedfd7841f813c255 (diff)
Feeds: Secondary sort by discovery time
IssueID #173
Diffstat (limited to 'src')
-rw-r--r--src/feeds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feeds.c b/src/feeds.c
index 3fb05d14..c66b2b84 100644
--- a/src/feeds.c
+++ b/src/feeds.c
@@ -598,7 +598,10 @@ void removeEntries_Feeds(uint32_t feedBookmarkId) {
598 598
599static int cmpTimeDescending_FeedEntryPtr_(const void *a, const void *b) { 599static int cmpTimeDescending_FeedEntryPtr_(const void *a, const void *b) {
600 const iFeedEntry * const *e1 = a, * const *e2 = b; 600 const iFeedEntry * const *e1 = a, * const *e2 = b;
601 return -cmp_Time(&(*e1)->posted, &(*e2)->posted); 601 const int cmpPosted = -cmp_Time(&(*e1)->posted, &(*e2)->posted);
602 if (cmpPosted) return cmpPosted;
603 /* Posting timestamps may only be accurate to a day, so also sort by discovery time. */
604 return -cmp_Time(&(*e1)->discovered, &(*e2)->discovered);
602} 605}
603 606
604const iPtrArray *listEntries_Feeds(void) { 607const iPtrArray *listEntries_Feeds(void) {