summaryrefslogtreecommitdiffstats
path: root/js/public
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:50:46 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:51:04 +0200
commit1fbcd35ac8f868e48228aafa375c5a305554a3c3 (patch)
treef3b40fa3e34f90774097bf78ceffc7f4527fa05b /js/public
parent19b9456b6a96e8139d62a498fb31a96ed36fb442 (diff)
always return the unreadcount when marking read to set update request as 0, dont create new feeds that only consist of unreadcount updates
Diffstat (limited to 'js/public')
-rw-r--r--js/public/app.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/js/public/app.js b/js/public/app.js
index 624c4575d..15504d914 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -1617,13 +1617,15 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
if (updateById || updateByUrlHash) {
return this.update(data, clearCache);
} else {
- this._urlHash[data.urlHash] = data;
- if (angular.isDefined(data.id)) {
- return FeedModel.__super__.add.call(this, data, clearCache);
- } else {
- this._data.push(data);
- if (clearCache) {
- return this._invalidateCache();
+ if (angular.isDefined(data.urlHash)) {
+ this._urlHash[data.urlHash] = data;
+ if (angular.isDefined(data.id)) {
+ return FeedModel.__super__.add.call(this, data, clearCache);
+ } else {
+ this._data.push(data);
+ if (clearCache) {
+ return this._invalidateCache();
+ }
}
}
}
@@ -1635,7 +1637,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
if (clearCache == null) {
clearCache = true;
}
- item = this._urlHash[data.urlHash];
+ if (angular.isDefined(data.urlHash)) {
+ item = this._urlHash[data.urlHash];
+ }
if (angular.isUndefined(data.id) && angular.isDefined(item)) {
return angular.extend(item, data);
} else {