summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-06-03 20:02:51 +0400
committerAndrew Dolgov <[email protected]>2012-06-03 20:02:51 +0400
commit184f51952c2c0bdcafab9d22a9367facbea28376 (patch)
tree786b8c41bab376d1133f6732ec36343f83866d1f /js
parentc21a462d52bd32737c32c29b060da03b38f1c2e6 (diff)
experimental tweak to not mark articles newer than last one loaded in the buffer as read
Diffstat (limited to 'js')
-rw-r--r--js/feedlist.js18
1 files changed, 17 insertions, 1 deletions
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);