]> git.wh0rd.org Git - tt-rss.git/commitdiff
cleanup previous patch
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 15 Sep 2012 16:44:50 +0000 (20:44 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 15 Sep 2012 16:44:50 +0000 (20:44 +0400)
js/FeedTree.js

index 6e3043604c6defbe37fd57dc33816af3b8f3e249..5b5f89558ec6fdccc2d72a572fa899c74b90dc3e 100644 (file)
@@ -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];