summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-12 17:55:35 +0300
committerAndrew Dolgov <[email protected]>2015-07-12 18:08:02 +0300
commit48fefe2f6b6e625b64b0c6d54e35e3608e70a1bd (patch)
tree19fc05a66c470cb79a5a0775d75e7a28113d1dc3 /js
parentec57104d6e221a2a44752d6f68615055eefea1db (diff)
fixes for first_id stuff
Diffstat (limited to 'js')
-rw-r--r--js/feedlist.js6
-rw-r--r--js/viewfeed.js8
2 files changed, 7 insertions, 7 deletions
diff --git a/js/feedlist.js b/js/feedlist.js
index 54ad1cc50..0bfb6b6a7 100644
--- a/js/feedlist.js
+++ b/js/feedlist.js
@@ -100,10 +100,8 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req, can_w
}
if (offset > 0) {
- var firstRow = $$('div[id*="RROW-"]').first();
-
- if (firstRow) {
- query = query + "&topid=" + param_escape(parseInt(firstRow.id.replace("RROW-", "")));
+ if (current_first_id) {
+ query = query + "&fid=" + param_escape(current_first_id);
}
}
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 3fc616058..1a45e8bb5 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -13,6 +13,7 @@ var catchup_timeout_id = false;
var cids_requested = [];
var loaded_article_ids = [];
var _last_headlines_update = 0;
+var current_first_id = 0;
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
@@ -77,6 +78,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
_infscroll_disable = 0;
}
+ current_first_id = reply['headlines']['first_id'];
var counters = reply['counters'];
var articles = reply['articles'];
//var runtime_info = reply['runtime-info'];
@@ -183,13 +185,13 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
} else {
console.log("no new headlines received");
- var top_id_changed = reply['headlines']['top_id_changed'];
- console.log("top id changed:" + top_id_changed);
+ var first_id_changed = reply['headlines']['first_id_changed'];
+ console.log("first id changed:" + first_id_changed);
var hsp = $("headlines-spacer");
if (hsp) {
- if (top_id_changed) {
+ if (first_id_changed) {
hsp.innerHTML = "<a href='#' onclick='viewCurrentFeed()'>" +
__("New articles found, reload feed to continue.") + "</a>";
} else {