diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/feeds.c | 11 | ||||
-rw-r--r-- | src/feeds.h | 9 |
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 | ||
460 | void 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 | |||
460 | static int cmpTimeDescending_FeedEntryPtr_(const void *a, const void *b) { | 471 | static 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 | ||
37 | void init_Feeds (const char *saveDir); | 37 | void init_Feeds (const char *saveDir); |
38 | void deinit_Feeds (void); | 38 | void deinit_Feeds (void); |
39 | void refresh_Feeds (void); | 39 | void refresh_Feeds (void); |
40 | void removeEntries_Feeds (uint32_t feedBookmarkId); | ||
40 | 41 | ||
41 | void refreshFinished_Feeds (void); /* called on "feeds.update.finished" */ | 42 | void refreshFinished_Feeds (void); /* called on "feeds.update.finished" */ |
42 | 43 | ||
43 | const iPtrArray * listEntries_Feeds (void); | 44 | const iPtrArray * listEntries_Feeds (void); |
44 | const iString * entryListPage_Feeds (void); | 45 | const iString * entryListPage_Feeds (void); |