From: Andrew Dolgov Date: Tue, 20 May 2008 16:06:12 +0000 (+0100) Subject: dispose from out of sequence article_callback2() calls X-Git-Tag: 1.2.23-final~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=022d9e9e458edc1ec277e2c73df28df8cfeb1322;p=tt-rss.git dispose from out of sequence article_callback2() calls --- diff --git a/viewfeed.js b/viewfeed.js index bd548ced..713cc7e4 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -20,6 +20,8 @@ var article_cache = new Array(); var vgroup_last_feed = false; var post_under_pointer = false; +var last_requested_article = false; + function catchup_callback() { if (xmlhttp_rpc.readyState == 4) { try { @@ -320,6 +322,8 @@ 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; @@ -435,6 +439,7 @@ function view(id, feed_id, skip_history) { query = query + "&mode=prefetch"; + showArticleInHeadlines(id); render_article(cached_article); } else if (cached_article) { @@ -447,6 +452,8 @@ function view(id, feed_id, skip_history) { cache_expire(); + last_requested_article = id; + new Ajax.Request(query, { onComplete: function(transport) { article_callback2(transport, id, feed_id);