diff options
| author | 2020-05-18 18:45:47 +0200 | |
|---|---|---|
| committer | 2020-05-18 18:45:47 +0200 | |
| commit | 0442243037fc7fb80228790a871328629a1aa882 (patch) | |
| tree | 690cde0ab388a341d22e436032d329d46dd07284 /app/views/index/normal.phtml | |
| parent | fa56f90223ce44c34b2919567d163ca4f2e81f65 (diff) | |
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
Diffstat (limited to 'app/views/index/normal.phtml')
| -rw-r--r-- | app/views/index/normal.phtml | 7 |
1 files changed, 1 insertions, 6 deletions
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 @@ <?php - $this->partial('aside_feed'); $this->partial('nav_menu'); @@ -19,13 +18,9 @@ $today = @strtotime('today'); <div id="new-article"> <a href="<?= Minz_Url::display(Minz_Request::currentRequest()) ?>"><?= _t('gen.js.new_article'); /* TODO: move string in JS*/ ?></a> </div><?php - $firstEntry = null; $lastEntry = null; $nbEntries = 0; foreach ($this->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'); ?></div><?php else: |
