summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feeds.c11
-rw-r--r--src/feeds.h9
2 files changed, 16 insertions, 4 deletions
diff --git a/src/feeds.c b/src/feeds.c
index 1af42477..211ee353 100644
--- a/src/feeds.c
+++ b/src/feeds.c
@@ -457,6 +457,17 @@ void refreshFinished_Feeds(void) {
457 stopWorker_Feeds_(&feeds_); 457 stopWorker_Feeds_(&feeds_);
458} 458}
459 459
460void removeEntries_Feeds(uint32_t feedBookmarkId) {
461 iFeeds *d = &feeds_;
462 iForEach(Array, i, &d->entries.values) {
463 iFeedEntry **entry = i.value;
464 if ((*entry)->bookmarkId == feedBookmarkId) {
465 delete_FeedEntry(*entry);
466 remove_ArrayIterator(&i);
467 }
468 }
469}
470
460static int cmpTimeDescending_FeedEntryPtr_(const void *a, const void *b) { 471static int cmpTimeDescending_FeedEntryPtr_(const void *a, const void *b) {
461 const iFeedEntry * const *e1 = a, * const *e2 = b; 472 const iFeedEntry * const *e1 = a, * const *e2 = b;
462 return -cmp_Time(&(*e1)->timestamp, &(*e2)->timestamp); 473 return -cmp_Time(&(*e1)->timestamp, &(*e2)->timestamp);
diff --git a/src/feeds.h b/src/feeds.h
index eb516690..5d1a47e0 100644
--- a/src/feeds.h
+++ b/src/feeds.h
@@ -34,11 +34,12 @@ struct Impl_FeedEntry {
34 uint32_t bookmarkId; /* note: runtime only, not a persistent ID */ 34 uint32_t bookmarkId; /* note: runtime only, not a persistent ID */
35}; 35};
36 36
37void init_Feeds (const char *saveDir); 37void init_Feeds (const char *saveDir);
38void deinit_Feeds (void); 38void deinit_Feeds (void);
39void refresh_Feeds (void); 39void refresh_Feeds (void);
40void removeEntries_Feeds (uint32_t feedBookmarkId);
40 41
41void refreshFinished_Feeds (void); /* called on "feeds.update.finished" */ 42void refreshFinished_Feeds (void); /* called on "feeds.update.finished" */
42 43
43const iPtrArray * listEntries_Feeds (void); 44const iPtrArray * listEntries_Feeds (void);
44const iString * entryListPage_Feeds (void); 45const iString * entryListPage_Feeds (void);