From 1a8a623924a441923933cc9cbccc8f836df7e8a9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 15 Sep 2012 20:44:50 +0400 Subject: [PATCH] cleanup previous patch --- js/FeedTree.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/js/FeedTree.js b/js/FeedTree.js index 6e3043604..5b5f89558 100644 --- a/js/FeedTree.js +++ b/js/FeedTree.js @@ -250,12 +250,6 @@ dojo.declare("fox.FeedTree", dijit.Tree, { var tree = this; if (cat && cat.items) { - cat.items.each(function(child) { - if (child.items) { - tree.hideReadCat(child, hide, show_special); - } - }); - var cat_unread = tree.hideReadFeeds(cat.items, hide, show_special); var id = String(cat.id); @@ -299,7 +293,14 @@ dojo.declare("fox.FeedTree", dijit.Tree, { items.each(function(feed) { var id = String(feed.id); - if (!id.match("^CAT:")) { + // it's a subcategory + if (feed.items) { + feed.items.each(function(child) { + if (child.items) { + tree.hideReadCat(child, hide, show_special); + } + }); + } else { // it's a feed var bare_id = parseInt(feed.bare_id);; var unread = feed.unread[0];