diff --git a/feedlist.js b/feedlist.js index ac852e9e9..66b040f9f 100644 --- a/feedlist.js +++ b/feedlist.js @@ -1,5 +1,7 @@ //var xmlhttp = Ajax.getTransport(); +var feed_cur_page = 0; + function viewCategory(cat) { active_feed_is_cat = true; viewfeed(cat, '', true); @@ -35,13 +37,35 @@ function viewFeedGoPage(i) { } } + +function viewNextFeedPage() { + try { + if (!getActiveFeedId()) return; + + feed_cur_page++; + + viewfeed(getActiveFeedId(), undefined, undefined, undefined, + undefined, feed_cur_page); + + } catch (e) { + exception_error(e, "viewFeedGoPage"); + } +} + function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) { try { - //if (!offset) page_offset = 0; +// if (!offset) page_offset = 0; - if (offset != undefined) { + if (offset > 0) { page_offset = offset; + } else { + page_offset = 0; + feed_cur_page = 0; + } + + if (getActiveFeedId() != feed) { + feed_cur_page = 0; } enableHotkeys(); diff --git a/functions.php b/functions.php index 3bf2a0b7d..7ca93956d 100644 --- a/functions.php +++ b/functions.php @@ -3693,7 +3693,9 @@ $topmost_article_ids = array(); - if (!$offset) $offset = 0; + if (!$offset) { + $offset = 0; + } if ($subop == "undefined") $subop = ""; @@ -3777,24 +3779,26 @@ /// STOP ////////////////////////////////////////////////////////////////////////////////// - print "