diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-04 21:18:43 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-04 21:18:43 +0200 |
commit | 76267670f3dcb6793a62a30477db830f482b4495 (patch) | |
tree | 92e42518925cfe367070163f5377db24a1f5de6c /js/app/services/bl/feedbl.coffee | |
parent | 346346e01c5c61e61b522520248de90e0ede3f17 (diff) |
finished feedbl methods
Diffstat (limited to 'js/app/services/bl/feedbl.coffee')
-rw-r--r-- | js/app/services/bl/feedbl.coffee | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/js/app/services/bl/feedbl.coffee b/js/app/services/bl/feedbl.coffee index d9524ae37..fa324f20f 100644 --- a/js/app/services/bl/feedbl.coffee +++ b/js/app/services/bl/feedbl.coffee @@ -73,7 +73,22 @@ angular.module('News').factory 'FeedBl', return @_feedModel.size() - # todo isvisible, move + isVisible: (feedId) -> + if @isActive(feedId) or @_showAll.getShowAll() + return true + else + return @_feedModel.getFeedUnreadCount(feedId) > 0 + + + move: (feedId, folderId) -> + feed = @_feedModel.getById(feedId) + if angular.isDefined(feed) and feed.folderId != folderId + @_feedModel.update({ + id: feedId, + folderId: folderId, + urlHash: feed.urlHash}) + @_persistence.moveFeed(feedId, folderId) + return new FeedBl(ShowAll, FeedModel, Persistence, ActiveFeed, FeedType, ItemModel) |