From b6c63d223931382aae84dc6d394cdd1bb58121bc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 4 Nov 2025 12:49:21 +0100 Subject: Better transitions between groups of articles (#8174) fix https://github.com/FreshRSS/FreshRSS/issues/7520 fix https://github.com/FreshRSS/FreshRSS/issues/8168 fix https://github.com/FreshRSS/FreshRSS/discussions/8172 --- app/views/index/normal.phtml | 31 +++++++++++-------------------- app/views/index/reader.phtml | 1 + app/views/stats/idle.phtml | 2 +- 3 files changed, 13 insertions(+), 21 deletions(-) (limited to 'app/views') diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index cc54d10fd..9f2bbdbcc 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -8,9 +8,7 @@ if (!Minz_Request::paramBoolean('ajax')) { call_user_func($this->callbackBeforeEntries, $this); -$display_today = FreshRSS_Context::$sort === 'id'; -$display_yesterday = $display_today; -$display_others = $display_today; +$last_transition = ''; $useKeepUnreadImportant = !FreshRSS_Context::isImportant() && !FreshRSS_Context::isFeed(); $today = @strtotime('today'); @@ -59,26 +57,19 @@ $today = @strtotime('today'); // We most likely already have the feed object in cache, otherwise make a request $this->feed = FreshRSS_Category::findFeed($this->categories, $this->entry->feedId()) ?? $this->entry->feed() ?? FreshRSS_Feed::default(); + $this->entry->_feed($this->feed); - if ($display_today && $this->entry->isDay(FreshRSS_Days::TODAY, $today)) { - ?>
- + if ($last_transition !== ($transition = FreshRSS_index_Controller::transition($this->entry, FreshRSS_Context::$sort))) { + $last_transition = $transition; + ?>
+ + show_favicons): ?> + ✇ + + +
entry->isDay(FreshRSS_Days::YESTERDAY, $today)) { - ?>
- - -
entry->isDay(FreshRSS_Days::BEFORE_YESTERDAY, $today)) { - ?>
- -
entry->isRead() ? ' not_read' : '' ?>entry->isFavorite() ? ' favorite' : '' ?>feed->priority() >= FreshRSS_Feed::PRIORITY_IMPORTANT) ? ' keep_unread ' : '' diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml index b01e246fd..4e2a4eed7 100644 --- a/app/views/stats/idle.phtml +++ b/app/views/stats/idle.phtml @@ -41,7 +41,7 @@
  • show_favicons): ?>✇ + endif; ?> ()
  • -- cgit v1.2.3