aboutsummaryrefslogtreecommitdiff
path: root/p/api/greader.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-09-30 10:05:17 +0200
committerGravatar GitHub <noreply@github.com> 2025-09-30 10:05:17 +0200
commit34532c0dd49f825ca4f265db9dec446ec0ecd34f (patch)
tree365e6776b93c3e2d91b814e8db6fe0d4fcbdcf22 /p/api/greader.php
parent11e6e0394c9e617a56ac29afc7a341f19ac6662d (diff)
Add new visibility priority *Show in its feed* (#7972)
* Add new visibility priority *Show in its feed* fix https://github.com/FreshRSS/FreshRSS/pull/7970#issuecomment-3293917428 (you can't directly filter a hidden feed, it just shows a 404 page) And add a new visibility *Show in its feed* to show the feed in the list but not its articles. Ensure that visibility *hidden* is not shown to API. * TODO for later * Update app/i18n/pl/sub.php Co-authored-by: Inverle <inverle@proton.me>
Diffstat (limited to 'p/api/greader.php')
-rw-r--r--p/api/greader.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index b983bfa90..6b67a7451 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -340,6 +340,9 @@ final class GReaderAPI {
$categoryDAO = FreshRSS_Factory::createCategoryDao();
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$subscriptions[] = [
'id' => 'feed/' . $feed->id(),
'title' => escapeToUnicodeAlternative($feed->name(), true),
@@ -502,6 +505,9 @@ final class GReaderAPI {
foreach ($categoryDAO->listCategories(prePopulateFeeds: true, details: true) as $cat) {
$catLastUpdate = 0;
foreach ($cat->feeds() as $feed) {
+ if ($feed->priority() <= FreshRSS_Feed::PRIORITY_HIDDEN) {
+ continue;
+ }
$lastUpdate = $feedsNewestItemUsec['f_' . $feed->id()] ?? 0;
$unreadcounts[] = [
'id' => 'feed/' . $feed->id(),
@@ -662,7 +668,7 @@ final class GReaderAPI {
'starred' => 's',
'feed' => 'f',
'label' => 'c',
- 'reading-list' => 'A',
+ 'reading-list' => 'A', // All except PRIORITY_HIDDEN
default => 'A',
};