summaryrefslogtreecommitdiff
path: root/src/feeds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/feeds.c')
-rw-r--r--src/feeds.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/feeds.c b/src/feeds.c
index dcd97b43..6b102fef 100644
--- a/src/feeds.c
+++ b/src/feeds.c
@@ -300,8 +300,16 @@ static iBool isHeadingEntry_FeedEntry_(const iFeedEntry *d) {
300static iBool updateEntries_Feeds_(iFeeds *d, iPtrArray *incoming) { 300static iBool updateEntries_Feeds_(iFeeds *d, iPtrArray *incoming) {
301 iBool gotNew = iFalse; 301 iBool gotNew = iFalse;
302 lock_Mutex(d->mtx); 302 lock_Mutex(d->mtx);
303 iTime now;
304 initCurrent_Time(&now);
303 iForEach(PtrArray, i, incoming) { 305 iForEach(PtrArray, i, incoming) {
304 iFeedEntry *entry = i.ptr; 306 iFeedEntry *entry = i.ptr;
307 /* Disregard old entries. */
308 if (secondsSince_Time(&now, &entry->posted) >= maxAge_Visited) {
309 /* We don't remember this far back, so the unread status of the entry would
310 be incorrect. */
311 continue;
312 }
305 size_t pos; 313 size_t pos;
306 if (locate_SortedArray(&d->entries, &entry, &pos)) { 314 if (locate_SortedArray(&d->entries, &entry, &pos)) {
307 iFeedEntry *existing = *(iFeedEntry **) at_SortedArray(&d->entries, pos); 315 iFeedEntry *existing = *(iFeedEntry **) at_SortedArray(&d->entries, pos);