aboutsummaryrefslogtreecommitdiff
path: root/app/views/index/reader.phtml
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-11-08 20:23:54 +0100
committerGravatar GitHub <noreply@github.com> 2023-11-08 20:23:54 +0100
commit348028a29043b7d1d0f80544c44f0454b2c375c3 (patch)
tree8f01badaa6983341f27e8afb05e2e9d42992b9b0 /app/views/index/reader.phtml
parent7d26dcc8475e4c7c3f68358405e9074ed61e018c (diff)
New feature important feeds (#5782)
* New feature important feeds * Fix PHPStan * Initial style for important feeds + keep unread * Change UI order * Count important unread * Never mark as read important feeds during scroll * Fix i18n conf.iew.normal regression * Fix reader view * More fix reader view * Create important.svg * Fix title * Fix counter * Account for important during mark-all-as-read * Fix underline colour * 📌 * Changelog --------- Co-authored-by: math-gh <> Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Diffstat (limited to 'app/views/index/reader.phtml')
-rw-r--r--app/views/index/reader.phtml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index af5caccdc..014b1ab42 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -45,15 +45,15 @@ $MAX_TAGS_DISPLAYED = FreshRSS_Context::$user_conf->show_tags_max;
}
}
}
- ?><div class="flux<?= !$item->isRead() ? ' not_read' : '' ?><?= $item->isFavorite() ? ' favorite' : '' ?>" id="flux_<?= $item->id() ?>">
+
+ //We most likely already have the feed object in cache, otherwise make a request
+ $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feedId()) ?? $item->feed() ?? FreshRSS_Feed::example();
+ ?><div class="flux<?= !$item->isRead() ? ' not_read' : '' ?><?= $item->isFavorite() ? ' favorite' : '' ?>" id="flux_<?= $item->id() ?>" data-priority="<?= $feed->priority() ?>">
<article class="flux_content" dir="auto">
<div class="content <?= $content_width ?>">
<header>
<?php
- $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feedId()); //We most likely already have the feed object in cache
- if ($feed == null) $feed = $item->feed();
- if ($feed == null) continue;
$favoriteUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id()));
if ($item->isFavorite()) {
$favoriteUrl['params']['is_favorite'] = 0;