diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-05-28 15:42:32 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-05-28 15:42:32 +0200 |
commit | ddb0d5020f4deccc2aec9d959ea434828e60a699 (patch) | |
tree | 922720c01a020ca7420c6f0fa232536194eff5b5 /js/controller | |
parent | 71f25d7e8a70bd017d3589ae54efb19c4ba317f5 (diff) |
try to fix out of syn issue
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/NavigationController.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 3821be6c0..bbe6dff5b 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -63,6 +63,10 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, return FeedResource.getUnreadCount(); }; + this.isUnread = function () { + return this.getUnreadCount() > 0; + }; + this.getFeedUnreadCount = function (feedId) { var feed = FeedResource.getById(feedId); if (feed !== undefined) { @@ -72,14 +76,26 @@ function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, } }; + this.isFeedUnread = function (feedId) { + return this.getFeedUnreadCount(feedId) > 0; + }; + this.getFolderUnreadCount= function (folderId) { return FeedResource.getFolderUnreadCount(folderId); }; + this.isFolderUnread = function (folderId) { + return this.getFolderUnreadCount(folderId) > 0; + }; + this.getStarredCount = function () { return ItemResource.getStarredCount(); }; + this.isStarredUnread = function () { + return this.getStarredCount() > 0; + }; + this.toggleFolder = function (folderName) { FolderResource.toggleOpen(folderName); }; |