diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/sidebarwidget.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index c31e157c..db00209f 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -141,16 +141,12 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
141 | init_Date(&on, &now); | 141 | init_Date(&on, &now); |
142 | const int thisYear = on.year; | 142 | const int thisYear = on.year; |
143 | iZap(on); | 143 | iZap(on); |
144 | size_t numItems = 0; | ||
144 | iConstForEach(PtrArray, i, listEntries_Feeds()) { | 145 | iConstForEach(PtrArray, i, listEntries_Feeds()) { |
145 | const iFeedEntry *entry = i.ptr; | 146 | const iFeedEntry *entry = i.ptr; |
146 | if (isHidden_FeedEntry(entry)) { | 147 | if (isHidden_FeedEntry(entry)) { |
147 | continue; /* A hidden entry. */ | 148 | continue; /* A hidden entry. */ |
148 | } | 149 | } |
149 | /* For more items, one can always see "about:feeds". A large number of items | ||
150 | is a bit difficult to navigate in the sidebar. */ | ||
151 | if (numItems_ListWidget(d->list) == 100) { | ||
152 | break; | ||
153 | } | ||
154 | /* Exclude entries that are too old for Visited to keep track of. */ | 150 | /* Exclude entries that are too old for Visited to keep track of. */ |
155 | if (secondsSince_Time(&now, &entry->discovered) > maxAge_Visited) { | 151 | if (secondsSince_Time(&now, &entry->discovered) > maxAge_Visited) { |
156 | break; /* the rest are even older */ | 152 | break; /* the rest are even older */ |
@@ -185,6 +181,11 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
185 | } | 181 | } |
186 | addItem_ListWidget(d->list, item); | 182 | addItem_ListWidget(d->list, item); |
187 | iRelease(item); | 183 | iRelease(item); |
184 | if (++numItems == 100) { | ||
185 | /* For more items, one can always see "about:feeds". A large number of items | ||
186 | is a bit difficult to navigate in the sidebar. */ | ||
187 | break; | ||
188 | } | ||
188 | } | 189 | } |
189 | d->menu = makeMenu_Widget( | 190 | d->menu = makeMenu_Widget( |
190 | as_Widget(d), | 191 | as_Widget(d), |