From 022d9e9e458edc1ec277e2c73df28df8cfeb1322 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 20 May 2008 17:06:12 +0100 Subject: [PATCH] dispose from out of sequence article_callback2() calls --- viewfeed.js | 7 +++++++ 1 file changed, 7 insertions(+) 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); -- 2.39.5