From 7553dd8b61ae62ceb3f9a8e1d1973d91789c7c43 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 24 Aug 2006 06:59:01 +0100 Subject: [PATCH] auto-unhide feeds with new articles on counter update, if hidden before (thread 109) --- functions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.js b/functions.js index 2b74731e1..c67d5dfa5 100644 --- a/functions.js +++ b/functions.js @@ -573,6 +573,9 @@ function parse_counters(reply, scheduled_call) { } } + hideOrShowFeeds(getFeedsContext().document, + getInitParam("hide_read_feeds") == 1); + var feeds_stored = getMainContext().number_of_feeds; debug("Feed counters, C: " + feeds_found + ", S:" + feeds_stored); @@ -750,6 +753,8 @@ function popupHelp(tid) { function hideOrShowFeeds(doc, hide) { + debug("hideOrShowFeeds: " + doc + ", " + hide); + var fd = getFeedsContext().document; var list = fd.getElementById("feedList"); @@ -798,6 +803,7 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) { } if (has_unread) { + node.childNodes[i].style.display = "list-item"; cat_unread++; } } @@ -815,6 +821,8 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) { } else { cat_node.style.display = "list-item"; } + } else { + cat_node.style.display = "list-item"; } // debug("unread for category: " + cat_unread);