diff options
author | Andrew Dolgov <[email protected]> | 2008-05-22 06:45:11 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-05-22 06:45:11 +0100 |
commit | fbcabe1e3ef43b392a2443b7da3ea299327a4516 (patch) | |
tree | 61e8cac048a60e799e47e61dbe6c18de7cb310fb | |
parent | 3f70f90ffec28379ef059f36c74a8df173a93022 (diff) |
parse article reply for content to cache even when it is out of sequence
-rw-r--r-- | viewfeed.js | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/viewfeed.js b/viewfeed.js index c8953fa1d..1cefc2d61 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -322,16 +322,9 @@ function article_callback2(transport, id, feed_id) { try { debug("article_callback2 " + id); - if (id != last_requested_article) return; - if (transport.responseXML) { - active_real_feed_id = feed_id; - active_post_id = id; - - showArticleInHeadlines(id); - - var reply = transport.responseXML.firstChild.firstChild; + debug("looking for articles to cache..."); var articles = transport.responseXML.getElementsByTagName("article"); @@ -347,6 +340,18 @@ function article_callback2(transport, id, feed_id) { cache_inject(a_id, articles[i].firstChild.nodeValue); } + + if (id != last_requested_article) { + debug("requested article id is out of sequence, aborting"); + return; + } + + active_real_feed_id = feed_id; + active_post_id = id; + + showArticleInHeadlines(id); + + var reply = transport.responseXML.firstChild.firstChild; } else { debug("article_callback: returned no XML object"); |