diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-09-05 15:29:08 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-09-05 15:29:44 +0200 |
commit | 4c8457c01e5683cc77370a344d24ad2cd6763e7f (patch) | |
tree | c3452a1deb515feb30227fd2fecff38b550e6e61 /js/menu.js | |
parent | fd16daf12d07bd67db7e5af1d7cd964707d4bedc (diff) |
fixed bug that would prevent marking as keep_unread when directly clicking on the checkbox, fixed bug that prevented a folder being set as all read
Diffstat (limited to 'js/menu.js')
-rw-r--r-- | js/menu.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/menu.js b/js/menu.js index 2a2b930b6..0980e4ca1 100644 --- a/js/menu.js +++ b/js/menu.js @@ -799,14 +799,14 @@ var News = News || {}; // check if we got a parent folder and update its unread count if(type === MenuNodeType.Feed){ var $folder = $node.parent().parent(); - var folderData = $(this._getIdAndTypeFromNode($folder)); - + var folderData = this._getIdAndTypeFromNode($folder); if(folderData.type === MenuNodeType.Folder){ var folderUnreadCount = 0; - $node.siblings('li').each(function(){ - var feedData = $(this._getIdAndTypeFromNode($(this))); + var self = this; + $folder.children('ul').children('li').each(function(){ + var feedData = self._getIdAndTypeFromNode($(this)); if(feedData.type === MenuNodeType.Feed){ - folderUnreadCount += this._unreadCount.Feed[feedData.id]; + folderUnreadCount += self._unreadCount.Feed[feedData.id]; } }); this._applyUnreadCountStyle(MenuNodeType.Folder, folderData.id, |