catchupArticlesById($this->link, $ids, $cmode);
- print json_encode(array("message" => "UPDATE_COUNTERS"));
+ print json_encode(array("message" => "UPDATE_COUNTERS", "ids" => $ids));
}
function markSelected() {
}
_infscroll_request_sent = 0;
- _last_headlines_update = new Date().getTime() / 1000;
+ _last_headlines_update = new Date().getTime();
unpackVisibleHeadlines();
if (getInitParam("cdm_auto_catchup") == 1) {
// let's get DOM some time to settle down
- var ts = new Date().getTime() / 1000;
-
- if (ts - _last_headlines_update < 3) return;
+ var ts = new Date().getTime();
+ if (ts - _last_headlines_update < 100) return;
$$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
function(child) {
onComplete: function(transport) {
handle_rpc_json(transport);
+ reply = JSON.parse(transport.responseText);
+ var batch = reply.ids;
+
batch.each(function(id) {
+ console.log(id);
var elem = $("RROW-" + id);
if (elem) elem.removeClassName("Unread");
catchup_id_batch.remove(id);