mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-14 18:23:52 -04:00
The sidebar does not render DOM elements for PRIORITY_HIDDEN feeds (aside_feed.phtml:114), but nbUnreadsPerFeed still reports their unread counts. In refreshUnreads(), the per-feed tracked count for the missing element stays at 0 while the server keeps reporting unreads > 0, which triggers the "new articles available" banner every poll cycle on the "All articles" view. Filter hidden feeds from the response, matching the convention already used in Category.php:42. Fixes https://github.com/FreshRSS/FreshRSS/issues/8694 Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
20 lines
428 B
PHTML
20 lines
428 B
PHTML
<?php
|
|
declare(strict_types=1);
|
|
/** @var FreshRSS_ViewJavascript $this */
|
|
|
|
$result = [
|
|
'feeds' => [],
|
|
'tags' => [],
|
|
];
|
|
foreach ($this->categories as $cat) {
|
|
foreach ($cat->feeds() as $feed) {
|
|
if ($feed->priority() > FreshRSS_Feed::PRIORITY_HIDDEN) {
|
|
$result['feeds'][$feed->id()] = $feed->nbNotRead();
|
|
}
|
|
}
|
|
}
|
|
foreach ($this->tags as $tag) {
|
|
$result['tags'][$tag->id()] = $tag->nbUnread();
|
|
}
|
|
echo json_encode($result);
|