From 184f51952c2c0bdcafab9d22a9367facbea28376 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Jun 2012 20:02:51 +0400 Subject: experimental tweak to not mark articles newer than last one loaded in the buffer as read --- js/feedlist.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'js/feedlist.js') diff --git a/js/feedlist.js b/js/feedlist.js index a2a24d0e0..4341a5d80 100644 --- a/js/feedlist.js +++ b/js/feedlist.js @@ -480,6 +480,8 @@ function catchupFeedInGroup(id) { function catchupFeed(feed, is_cat) { try { + if (is_cat == undefined) is_cat = false; + var str = __("Mark all articles in %s as read?"); var fn = getFeedName(feed, is_cat); @@ -489,8 +491,22 @@ function catchupFeed(feed, is_cat) { return; } + var max_id = 0; + + if (feed = getActiveFeedId() && is_cat == activeFeedIsCat()) { + $$("#headlines-frame > div[id*=RROW]").each( + function(child) { + var id = parseInt(child.id.replace("RROW-", "")); + + if (id > max_id) max_id = id; + } + ); + } + var catchup_query = "?op=rpc&method=catchupFeed&feed_id=" + - feed + "&is_cat=" + is_cat; + feed + "&is_cat=" + is_cat + "&max_id=" + max_id; + + console.log(catchup_query); notify_progress("Loading, please wait...", true); -- cgit v1.2.3