aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-05-20 07:07:00 +0200
committerGravatar GitHub <noreply@github.com> 2025-05-20 07:07:00 +0200
commit648eddaf130d53a4908f573ccb08c4a1dd0518e9 (patch)
tree5a8a7bee91b605273b2a5bc35b25bf27640af203
parent9fbde0605bef39be3f92e316806d33864b044967 (diff)
Fix important articles on reader view (#7602)
fix https://github.com/FreshRSS/FreshRSS/issues/7601
-rw-r--r--app/views/index/reader.phtml13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index adcb78908..bb957f232 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -9,6 +9,7 @@ if (!Minz_Request::paramBoolean('ajax')) {
call_user_func($this->callbackBeforeEntries, $this);
$lazyload = FreshRSS_Context::userConf()->lazyload;
+$useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context::isFeed();
?>
<main id="stream" class="reader">
<h1 class="title_hidden"><?= _t('conf.reading.view.reader') ?></h1>
@@ -29,9 +30,15 @@ $lazyload = FreshRSS_Context::userConf()->lazyload;
$nbEntries++;
//We most likely already have the feed object in cache, otherwise make a request
- $this->feed = FreshRSS_Category::findFeed($this->categories, $entry->feedId()) ?? $entry->feed() ?? FreshRSS_Feed::default();
- ?><div class="flux<?= !$entry->isRead() ? ' not_read' : '' ?><?= $entry->isFavorite() ? ' favorite' : '' ?>" id="flux_<?= $entry->id() ?>" data-priority="<?= $this->feed->priority() ?>">
- <?php $this->renderHelper('index/article'); ?>
+ $this->feed = FreshRSS_Category::findFeed($this->categories, $this->entry->feedId()) ?? $this->entry->feed() ?? FreshRSS_Feed::default();
+ ?><div class="flux<?= !$this->entry->isRead() ? ' not_read' : ''
+ ?><?= $this->entry->isFavorite() ? ' favorite' : ''
+ ?><?= $useKeepUnreadImportant && ($this->feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : ''
+ ?>" id="flux_<?= $this->entry->id()
+ ?>" data-entry="<?= $this->entry->id()
+ ?>" data-feed="<?= $this->feed->id()
+ ?>" data-priority="<?= $this->feed->priority()
+ ?>"><?php $this->renderHelper('index/article'); ?>
</div><?php
endforeach;