summaryrefslogtreecommitdiffstats
path: root/js/controller/NavigationController.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controller/NavigationController.js')
-rw-r--r--js/controller/NavigationController.js16
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);
};