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 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'app/views/index/normal.phtml') 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)) { - ?>
- -