mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 08:05:56 +00:00
remove previous counter hacks; force request counters when there's no
unread stuff left in current feed (e.g. finished reading)
This commit is contained in:
@@ -247,8 +247,6 @@ class RPC extends Handler_Protected {
|
|||||||
|
|
||||||
if ($last_article_id != getLastArticleId($this->link)) {
|
if ($last_article_id != getLastArticleId($this->link)) {
|
||||||
$reply['counters'] = getAllCounters($this->link);
|
$reply['counters'] = getAllCounters($this->link);
|
||||||
} else {
|
|
||||||
$reply['counters'] = getVirtCounters($this->link);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$reply['runtime-info'] = make_runtime_info($this->link);
|
$reply['runtime-info'] = make_runtime_info($this->link);
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ function request_counters(force) {
|
|||||||
|
|
||||||
var query = "?op=rpc&method=getAllCounters&seq=" + next_seq();
|
var query = "?op=rpc&method=getAllCounters&seq=" + next_seq();
|
||||||
|
|
||||||
if (!force && Math.random() >= 0.5)
|
if (!force)
|
||||||
query = query + "&last_article_id=" + getInitParam("last_article_id");
|
query = query + "&last_article_id=" + getInitParam("last_article_id");
|
||||||
|
|
||||||
console.log(query);
|
console.log(query);
|
||||||
|
|||||||
@@ -325,7 +325,8 @@ function article_callback2(transport, id) {
|
|||||||
Element.show(dijit.byId("net-alert").domNode);
|
Element.show(dijit.byId("net-alert").domNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
request_counters();
|
var unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length
|
||||||
|
request_counters(unread_in_buffer == 0);
|
||||||
|
|
||||||
headlines_scroll_handler($("headlines-frame"));
|
headlines_scroll_handler($("headlines-frame"));
|
||||||
|
|
||||||
@@ -1550,7 +1551,8 @@ function cdmClicked(event, id) {
|
|||||||
openArticleInNewWindow(id);
|
openArticleInNewWindow(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
request_counters();
|
var unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length
|
||||||
|
request_counters(unread_in_buffer == 0);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("cdmClicked");
|
exception_error("cdmClicked");
|
||||||
|
|||||||
Reference in New Issue
Block a user