summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-24 06:59:01 +0100
committerAndrew Dolgov <[email protected]>2006-08-24 06:59:01 +0100
commit7553dd8b61ae62ceb3f9a8e1d1973d91789c7c43 (patch)
treec4f81c720aa092baa9b50aa89a5ed769a617eaf8 /functions.js
parent0599d09e016efccdb8c1c07d318d332f2c0a112f (diff)
auto-unhide feeds with new articles on counter update, if hidden before (thread 109)
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js8
1 files changed, 8 insertions, 0 deletions
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);