auto-unhide feeds with new articles on counter update, if hidden before (thread 109)

This commit is contained in:
Andrew Dolgov 2006-08-24 06:59:01 +01:00
parent 0599d09e01
commit 7553dd8b61
1 changed files with 8 additions and 0 deletions

View File

@ -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; var feeds_stored = getMainContext().number_of_feeds;
debug("Feed counters, C: " + feeds_found + ", S:" + feeds_stored); debug("Feed counters, C: " + feeds_found + ", S:" + feeds_stored);
@ -750,6 +753,8 @@ function popupHelp(tid) {
function hideOrShowFeeds(doc, hide) { function hideOrShowFeeds(doc, hide) {
debug("hideOrShowFeeds: " + doc + ", " + hide);
var fd = getFeedsContext().document; var fd = getFeedsContext().document;
var list = fd.getElementById("feedList"); var list = fd.getElementById("feedList");
@ -798,6 +803,7 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
} }
if (has_unread) { if (has_unread) {
node.childNodes[i].style.display = "list-item";
cat_unread++; cat_unread++;
} }
} }
@ -815,6 +821,8 @@ function hideOrShowFeedsCategory(doc, node, hide, cat_node) {
} else { } else {
cat_node.style.display = "list-item"; cat_node.style.display = "list-item";
} }
} else {
cat_node.style.display = "list-item";
} }
// debug("unread for category: " + cat_unread); // debug("unread for category: " + cat_unread);