From 0442243037fc7fb80228790a871328629a1aa882 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 18 May 2020 18:45:47 +0200 Subject: Fix nav_menu mark-as-read (#2909) * Fix nav_menu mark-as-read #Fix https://github.com/FreshRSS/FreshRSS/issues/2905 Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2588 We need info about the first item (id_max) before being able to output nav_menu. Before https://github.com/FreshRSS/FreshRSS/pull/2588 we used to output everything in memory before starting to produce an output. Now that we stream the output, we need a temporary buffer until we have received the first item/article. * Repair loading page * Simplify CSS Make it work in Chrome as well * Lint * Partial revert * Base max_id solely on current time --- app/views/index/normal.phtml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/views/index/normal.phtml') diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 50574ee4d..e56e99561 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -1,5 +1,4 @@ partial('aside_feed'); $this->partial('nav_menu'); @@ -19,13 +18,9 @@ $today = @strtotime('today');
entries as $item): - if ($nbEntries === 0) { - $firstEntry = $item; - } $lastEntry = $item; $nbEntries++; ob_flush(); @@ -100,7 +95,7 @@ $today = @strtotime('today'); endforeach; if ($nbEntries > 0): - call_user_func($this->callbackBeforePagination, $this, $nbEntries, $firstEntry, $lastEntry); + call_user_func($this->callbackBeforePagination, $this, $nbEntries, $lastEntry); $this->renderHelper('pagination'); ?>