diff options
author | Andrew Dolgov <[email protected]> | 2006-08-13 10:45:30 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2006-08-13 10:45:30 +0100 |
commit | 7bf7e4d3ef9b2993f24caff2339fcf78a2027321 (patch) | |
tree | 7b036697c118bdac09ccd768b5021a2c84a7ddcd /functions.js | |
parent | aec3ce39de92ab044cbfb4eaa7f98a564a010510 (diff) |
rework auto-refresh method if number of subscriptions changed
Diffstat (limited to 'functions.js')
-rw-r--r-- | functions.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/functions.js b/functions.js index 4ab997d80..269093022 100644 --- a/functions.js +++ b/functions.js @@ -490,15 +490,16 @@ function parse_counters(reply, scheduled_call) { var has_img = reply.childNodes[l].getAttribute("hi"); var updated = reply.childNodes[l].getAttribute("updated"); - if (t == "feed") { - feeds_found++; - } - if (id == "global-unread") { title_obj.global_unread = ctr; title_obj.updateTitle(); continue; } + + if (id == "subscribed-feeds") { + feeds_found = ctr; + continue; + } if (t == "category") { var catctr = f_document.getElementById("FCATCTR-" + id); @@ -573,10 +574,9 @@ function parse_counters(reply, scheduled_call) { debug("Feed counters, C: " + feeds_found + ", S:" + feeds_stored); if (feeds_stored != feeds_found) { - if (feeds_found != 0) { - getMainContext().number_of_feeds = feeds_found; - } - if (feeds_stored != 0 && feeds_found != 0) { + getMainContext().number_of_feeds = feeds_found; + + if (feeds_stored != 0) { debug("Subscribed feed number changed, refreshing feedlist"); updateFeedList(); } |