summaryrefslogtreecommitdiff
path: root/src/feeds.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-01-18 19:22:03 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-01-18 19:22:03 +0200
commite8412f167ec2c8d72055181c2c5e1df09699a94e (patch)
tree17d8abb099580ac109f1ab16dab1f5c4c02998e8 /src/feeds.c
parente39a4035a622e1e9e1573cc567cb43652fdef231 (diff)
Fixed opening heading feed entries in a tab
The heading goto fragment wasn't being stripped appropriately from the URLs.
Diffstat (limited to 'src/feeds.c')
-rw-r--r--src/feeds.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/feeds.c b/src/feeds.c
index 75173ee1..a40df571 100644
--- a/src/feeds.c
+++ b/src/feeds.c
@@ -57,12 +57,7 @@ void deinit_FeedEntry(iFeedEntry *d) {
57} 57}
58 58
59const iString *url_FeedEntry(const iFeedEntry *d) { 59const iString *url_FeedEntry(const iFeedEntry *d) {
60 const size_t fragPos = indexOf_String(&d->url, '#'); 60 return urlFragmentStripped_String(&d->url);
61 if (fragPos != iInvalidPos) {
62 return collect_String(newRange_String((iRangecc){ constBegin_String(&d->url),
63 constBegin_String(&d->url) + fragPos }));
64 }
65 return &d->url;
66} 61}
67 62
68iBool isUnread_FeedEntry(const iFeedEntry *d) { 63iBool isUnread_FeedEntry(const iFeedEntry *d) {
@@ -300,6 +295,7 @@ static iBool updateEntries_Feeds_(iFeeds *d, iPtrArray *incoming) {
300 size_t pos; 295 size_t pos;
301 if (locate_SortedArray(&d->entries, &entry, &pos)) { 296 if (locate_SortedArray(&d->entries, &entry, &pos)) {
302 iFeedEntry *existing = *(iFeedEntry **) at_SortedArray(&d->entries, pos); 297 iFeedEntry *existing = *(iFeedEntry **) at_SortedArray(&d->entries, pos);
298 iAssert(isHeadingEntry_FeedEntry_(existing) == isHeadingEntry_FeedEntry_(entry));
303 /* Already known, but update it, maybe the time and label have changed. */ 299 /* Already known, but update it, maybe the time and label have changed. */
304 if (!isHeadingEntry_FeedEntry_(existing)) { 300 if (!isHeadingEntry_FeedEntry_(existing)) {
305 iBool changed = iFalse; 301 iBool changed = iFalse;