From 6cdc457643678e355a1a6e50acf03d8a0db49193 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 15 Sep 2012 20:39:44 +0400 Subject: [PATCH] feedtree: prevent hideReadFeeds from working on category nodes --- js/FeedTree.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/js/FeedTree.js b/js/FeedTree.js index fb744bf9f..6e3043604 100644 --- a/js/FeedTree.js +++ b/js/FeedTree.js @@ -298,18 +298,21 @@ dojo.declare("fox.FeedTree", dijit.Tree, { items.each(function(feed) { var id = String(feed.id); - var bare_id = parseInt(feed.bare_id);; - var unread = feed.unread[0]; - var node = tree._itemNodesMap[id]; + if (!id.match("^CAT:")) { + var bare_id = parseInt(feed.bare_id);; - if (node) { - if (hide && unread == 0 && (bare_id > 0 || !show_special)) { - Effect.Fade(node[0].rowNode, {duration : 0.3, - queue: { position: 'end', scope: 'FFADE-' + id, limit: 1 }}); - } else { - Element.show(node[0].rowNode); - ++cat_unread; + var unread = feed.unread[0]; + var node = tree._itemNodesMap[id]; + + if (node) { + if (hide && unread == 0 && (bare_id > 0 || !show_special)) { + Effect.Fade(node[0].rowNode, {duration : 0.3, + queue: { position: 'end', scope: 'FFADE-' + id, limit: 1 }}); + } else { + Element.show(node[0].rowNode); + ++cat_unread; + } } } });