diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 12:26:04 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-27 12:26:04 +0100 |
commit | 02ae36eba33a5e0957defd4619d337bfdd0c178f (patch) | |
tree | d80f58cdf9eb774d00fc5fc322bf0750b644dab2 /js/app/controllers | |
parent | 89a1713f062cc78b727c6240a91408d91611dbab (diff) |
fixed mark all unread serverside (was missing highestitemid, dont use lastmodified to compare for new versions but use the highest item id. if items are updated and the guidHash and feedId are the same then it will be deleted and newly inserted to make the lastmodified feasable
Diffstat (limited to 'js/app/controllers')
-rw-r--r-- | js/app/controllers/feedcontroller.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee index 1c04cd92e..14e1aea5b 100644 --- a/js/app/controllers/feedcontroller.coffee +++ b/js/app/controllers/feedcontroller.coffee @@ -179,7 +179,7 @@ angular.module('News').factory '_FeedController', -> @_persistence.getItems(type, id, 0) @_active.handle({id: id, type: type}) else - lastModified = @_itemModel.getLastModified() + lastModified = @_itemModel.getHighestId() @_persistence.getItems(type, id, 0, null, lastModified) @@ -208,6 +208,8 @@ angular.module('News').factory '_FeedController', -> feed = @_feedModel.getById(id) if angular.isDefined(feed) feed.unreadCount = 0 + # TODO: also update items in the right field if id is the + # the same highestItemId = @_itemModel.getHighestId() @_persistence.setFeedRead(id, highestItemId) when @_feedType.Folder |