summaryrefslogtreecommitdiffstats
path: root/js/service
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 20:08:02 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-12 20:08:02 +0200
commit218ddcaf530b9f22eb199ab8081ac1bb31fd9711 (patch)
treee6861963fdcd35056ff0411ae531427a6ad5b6b0 /js/service
parentb86a5591667ca8de3a83ef5bcbc756e356979b5a (diff)
mark read in the navigation, fix drag and drop
Diffstat (limited to 'js/service')
-rw-r--r--js/service/ItemResource.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/js/service/ItemResource.js b/js/service/ItemResource.js
index a25d6c3e7..c988e6729 100644
--- a/js/service/ItemResource.js
+++ b/js/service/ItemResource.js
@@ -11,7 +11,6 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
ITEM_BATCH_SIZE) {
'use strict';
-
var ItemResource = function ($http, BASE_URL, ITEM_BATCH_SIZE) {
Resource.call(this, $http, BASE_URL);
this.starredCount = 0;
@@ -131,7 +130,9 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
item.unread = !read;
});
- return this.http.post(this.BASE_URL + '/feeds/' + feedId + '/read');
+ return this.http.post(this.BASE_URL + '/feeds/' + feedId + '/read', {
+ highestItemId: this.getNewestItemId()
+ });
};
@@ -140,7 +141,13 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
item.unread = false;
});
- return this.http.post(this.BASE_URL + '/items/read');
+ return this.http({
+ url: this.BASE_URL + '/items/read',
+ method: 'POST',
+ data: {
+ highestItemId: this.getNewestItemId()
+ }
+ });
};