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

only unmark articles which had been processed when automarking (for realz)

This commit is contained in:
Andrew Dolgov
2013-04-04 09:49:37 +04:00
parent dfd071e28d
commit ae31704bb3
2 changed files with 8 additions and 5 deletions

View File

@@ -310,7 +310,7 @@ class RPC extends Handler_Protected {
catchupArticlesById($this->link, $ids, $cmode); catchupArticlesById($this->link, $ids, $cmode);
print json_encode(array("message" => "UPDATE_COUNTERS")); print json_encode(array("message" => "UPDATE_COUNTERS", "ids" => $ids));
} }
function markSelected() { function markSelected() {

View File

@@ -205,7 +205,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
} }
_infscroll_request_sent = 0; _infscroll_request_sent = 0;
_last_headlines_update = new Date().getTime() / 1000; _last_headlines_update = new Date().getTime();
unpackVisibleHeadlines(); unpackVisibleHeadlines();
@@ -1210,9 +1210,8 @@ function headlines_scroll_handler(e) {
if (getInitParam("cdm_auto_catchup") == 1) { if (getInitParam("cdm_auto_catchup") == 1) {
// let's get DOM some time to settle down // let's get DOM some time to settle down
var ts = new Date().getTime() / 1000; var ts = new Date().getTime();
if (ts - _last_headlines_update < 100) return;
if (ts - _last_headlines_update < 3) return;
$$("#headlines-frame > div[id*=RROW][class*=Unread]").each( $$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
function(child) { function(child) {
@@ -1259,7 +1258,11 @@ function catchupBatchedArticles() {
onComplete: function(transport) { onComplete: function(transport) {
handle_rpc_json(transport); handle_rpc_json(transport);
reply = JSON.parse(transport.responseText);
var batch = reply.ids;
batch.each(function(id) { batch.each(function(id) {
console.log(id);
var elem = $("RROW-" + id); var elem = $("RROW-" + id);
if (elem) elem.removeClassName("Unread"); if (elem) elem.removeClassName("Unread");
catchup_id_batch.remove(id); catchup_id_batch.remove(id);