Skip to content

Commit

Permalink
Fix wrong mark-as-read maxId argument (FreshRSS#2431)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex authored and mdemoss committed Mar 25, 2021
1 parent 8c66558 commit 74ef07d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/indexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function normalAction() {
}
};

$this->view->callbackBeforeEntries = function ($view) {
$this->view->callbackBeforePagination = function ($view) {
try {
FreshRSS_Context::$number++; //+1 for pagination
$entries = FreshRSS_index_Controller::listEntriesByContext();
Expand Down
9 changes: 8 additions & 1 deletion app/layout/nav_menu.phtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php $actual_view = Minz_Request::actionName(); ?>
<?php
$actual_view = Minz_Request::actionName();

flush();
if (isset($this->callbackBeforePagination)) {
call_user_func($this->callbackBeforePagination, $this);
}
?>

<div class="nav_menu">
<?php if ($actual_view === 'normal' || $actual_view === 'reader' ) { ?>
Expand Down
5 changes: 0 additions & 5 deletions app/views/index/global.phtml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?php
$this->partial('nav_menu');

flush();
if (isset($this->callbackBeforeEntries)) {
call_user_func($this->callbackBeforeEntries, $this);
}

$class = '';
if (FreshRSS_Context::$user_conf->hide_read_feeds &&
FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) &&
Expand Down
5 changes: 0 additions & 5 deletions app/views/index/normal.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
$this->partial('aside_feed');
$this->partial('nav_menu');

flush();
if (isset($this->callbackBeforeEntries)) {
call_user_func($this->callbackBeforeEntries, $this);
}

if (!empty($this->entries)) {
$display_today = true;
$display_yesterday = true;
Expand Down
5 changes: 0 additions & 5 deletions app/views/index/reader.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
$this->partial('aside_feed');
$this->partial('nav_menu');

flush();
if (isset($this->callbackBeforeEntries)) {
call_user_func($this->callbackBeforeEntries, $this);
}

if (!empty($this->entries)) {
$lazyload = FreshRSS_Context::$user_conf->lazyload;
$content_width = FreshRSS_Context::$user_conf->content_width;
Expand Down

0 comments on commit 74ef07d

Please sign in to comment.