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/reader.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/reader.phtml')
| -rw-r--r-- | app/views/index/reader.phtml | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 289c62662..c21fdb7f3 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -12,13 +12,9 @@ $content_width = FreshRSS_Context::$user_conf->content_width; <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(); @@ -76,7 +72,7 @@ $content_width = FreshRSS_Context::$user_conf->content_width; 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: |
