1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 20:45:55 +00:00

queryFeedHeadlines: move to array-based arguments, optionally check if first element changed when paginating

This commit is contained in:
Andrew Dolgov
2015-07-12 01:29:36 +03:00
parent 5f297a5c11
commit f5a0fb8b64
8 changed files with 186 additions and 18 deletions

View File

@@ -13,6 +13,7 @@ var catchup_timeout_id = false;
var cids_requested = [];
var loaded_article_ids = [];
var _last_headlines_update = 0;
var current_top_article_id = false;
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
@@ -83,6 +84,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
if (infscroll_req == false) {
loaded_article_ids = [];
current_top_article_id = false;
dijit.byId("headlines-frame").attr('content',
reply['headlines']['content']);
@@ -102,6 +104,10 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
}
});
if (loaded_article_ids.size() > 0) {
current_top_article_id = parseInt(loaded_article_ids[0].replace("RROW-", ""));
}
var hsp = $("headlines-spacer");
if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"});
dijit.byId('headlines-frame').domNode.appendChild(hsp);