From 4911c409cdd5f7c1e7e06ff3237748d6493ed3e6 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 27 Nov 2020 14:40:07 +0200 Subject: Feeds: Don't save entries discovered long ago --- src/feeds.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/feeds.c b/src/feeds.c index 3340d201..9fe6314c 100644 --- a/src/feeds.c +++ b/src/feeds.c @@ -323,8 +323,13 @@ static void save_Feeds_(iFeeds *d) { } } writeData_File(f, "# Entries\n", 10); + iTime now; + initCurrent_Time(&now); iConstForEach(Array, i, &d->entries.values) { const iFeedEntry *entry = *(const iFeedEntry **) i.value; + if (secondsSince_Time(&now, &entry->discovered) > maxAge_Visited) { + continue; /* Forget entries discovered long ago. */ + } format_String(str, "%x\n%llu\n%llu\n%s\n%s\n", entry->bookmarkId, integralSeconds_Time(&entry->posted), -- cgit v1.2.3