From 11063ec65cd0272bcc1ac30cca5812eb326819c8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Nov 2007 08:45:46 +0100 Subject: [PATCH] only update cache when viewing unread articles when view_mode is all_articles --- viewfeed.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/viewfeed.js b/viewfeed.js index c2a07c487..1ad7e77fc 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -259,7 +259,16 @@ function showArticleInHeadlines(id) { } else { cache_prefix = "F:"; } - + + var view_mode = false; + + try { + view_mode = document.forms['main_toolbar_form'].view_mode; + view_mode = view_mode[view_mode.selectedIndex].value; + } catch (e) { + exception_error("showArticleInHeadlines/viewmode", e, true); + } + if (upd_img_pic && upd_img_pic.src.match("updated.png")) { upd_img_pic.src = "images/blank_icon.gif"; @@ -269,7 +278,7 @@ function showArticleInHeadlines(id) { document.getElementById("headlines-frame").innerHTML, get_feed_unread(getActiveFeedId())); - } else if (article_is_unread) { + } else if (article_is_unread && view_mode == "all_articles") { cache_invalidate(cache_prefix + getActiveFeedId());