mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 23:05:56 +00:00
js: remove current_top_id global
This commit is contained in:
@@ -99,8 +99,12 @@ function viewfeed(feed, method, is_cat, offset, background, infscroll_req, can_w
|
|||||||
query = query + "&m=" + param_escape(method);
|
query = query + "&m=" + param_escape(method);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_top_article_id && offset > 0) {
|
if (offset > 0) {
|
||||||
query = query + "&topid=" + param_escape(current_top_article_id);
|
var firstRow = $$('div[id*="RROW-"]').first();
|
||||||
|
|
||||||
|
if (firstRow) {
|
||||||
|
query = query + "&topid=" + param_escape(parseInt(firstRow.id.replace("RROW-", "")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!background) {
|
if (!background) {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ var catchup_timeout_id = false;
|
|||||||
var cids_requested = [];
|
var cids_requested = [];
|
||||||
var loaded_article_ids = [];
|
var loaded_article_ids = [];
|
||||||
var _last_headlines_update = 0;
|
var _last_headlines_update = 0;
|
||||||
var current_top_article_id = false;
|
|
||||||
|
|
||||||
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
|
var has_storage = 'sessionStorage' in window && window['sessionStorage'] !== null;
|
||||||
|
|
||||||
@@ -84,7 +83,6 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|||||||
|
|
||||||
if (infscroll_req == false) {
|
if (infscroll_req == false) {
|
||||||
loaded_article_ids = [];
|
loaded_article_ids = [];
|
||||||
current_top_article_id = false;
|
|
||||||
|
|
||||||
dijit.byId("headlines-frame").attr('content',
|
dijit.byId("headlines-frame").attr('content',
|
||||||
reply['headlines']['content']);
|
reply['headlines']['content']);
|
||||||
@@ -104,10 +102,6 @@ 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");
|
var hsp = $("headlines-spacer");
|
||||||
if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"});
|
if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"});
|
||||||
dijit.byId('headlines-frame').domNode.appendChild(hsp);
|
dijit.byId('headlines-frame').domNode.appendChild(hsp);
|
||||||
|
|||||||
Reference in New Issue
Block a user