diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-16 17:24:15 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-04-16 17:24:15 +0200 |
commit | e48be020ad106b16c399c2f4a46741f1f31ea3f3 (patch) | |
tree | 30040bb5b12b62dc58ba39c9fe5d7265a7ac3918 /js/public | |
parent | 42ca456a059b7bb228a37a60cd82f141fe927e54 (diff) |
fix bug that prevented marking read if the highestitemid was 0 also clientside
Diffstat (limited to 'js/public')
-rw-r--r-- | js/public/app.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/js/public/app.js b/js/public/app.js index 1939c7165..624c4575d 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -703,6 +703,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. this._newLoading = _newLoading; this._utils = _utils; FeedBusinessLayer.__super__.constructor.call(this, activeFeed, persistence, itemModel, feedType.Feed); + this._feedType = feedType; } FeedBusinessLayer.prototype.getUnreadCount = function(feedId) { @@ -732,7 +733,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. feed = this._feedModel.getById(feedId); if (angular.isDefined(feed)) { feed.unreadCount = 0; - highestItemId = this._itemModel.getHighestId(); + if (this._activeFeed.getId() === feedId && this._activeFeed.getType() === this._feedType.Feed) { + highestItemId = this._itemModel.getHighestId(); + } else { + highestItemId = 0; + } this._persistence.setFeedRead(feedId, highestItemId); _ref = this._itemModel.getAll(); _results = []; |