summaryrefslogtreecommitdiff
path: root/js/FeedTree.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-09-14 02:40:01 +0400
committerAndrew Dolgov <[email protected]>2012-09-14 02:40:01 +0400
commit5712a2fe4b13cb9cd32f149ea17a70bdf0bfb086 (patch)
treefe6ba1dfc470d1c6c10afd8b5bae6949a0675739 /js/FeedTree.js
parentf393dc6fb260de3ed0d5faf29ea9bb053a1bf337 (diff)
FeedTree: fix subcategory entries not hidden properly
Diffstat (limited to 'js/FeedTree.js')
-rw-r--r--js/FeedTree.js23
1 files changed, 19 insertions, 4 deletions
diff --git a/js/FeedTree.js b/js/FeedTree.js
index de1329bbe..fb744bf9f 100644
--- a/js/FeedTree.js
+++ b/js/FeedTree.js
@@ -245,13 +245,17 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
hasCats: function() {
return this.model.hasCats();
},
- hideRead: function (hide, show_special) {
+ hideReadCat: function (cat, hide, show_special) {
if (this.hasCats()) {
-
var tree = this;
- var cats = this.model.store._arrayOfTopLevelItems;
- cats.each(function(cat) {
+ 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);
@@ -270,6 +274,17 @@ dojo.declare("fox.FeedTree", dijit.Tree, {
++cat_unread;
}
}
+ }
+ }
+ },
+ hideRead: function (hide, show_special) {
+ if (this.hasCats()) {
+
+ var tree = this;
+ var cats = this.model.store._arrayOfTopLevelItems;
+
+ cats.each(function(cat) {
+ tree.hideReadCat(cat, hide, show_special);
});
} else {