summaryrefslogtreecommitdiffstats
path: root/js/public
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-25 22:30:52 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-25 22:30:52 +0100
commit79105cc75673def0a7453b4a14fd7453e02a2d45 (patch)
tree31626a72430a83b8e882e127c73a7c5e00b7966a /js/public
parent3a237701e0c9ea8ea2bc4f5e6e4ac840282ab5fa (diff)
setting read and unread works now
Diffstat (limited to 'js/public')
-rw-r--r--js/public/app.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/public/app.js b/js/public/app.js
index d8303f06f..375b02554 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -553,10 +553,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
};
FeedModel.prototype.getFeedUnreadCount = function(feedId) {
- var feed;
+ var count, feed;
feed = this.getById(feedId);
+ count = 0;
if (angular.isDefined(feed)) {
- return feed.unreadCount;
+ return count += feed.unreadCount;
} else {
return 0;
}
@@ -890,9 +891,13 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
Persistence.prototype.getItems = function(type, id, offset, onSuccess, updatedSince) {
var data, params;
+ if (onSuccess == null) {
+ onSuccess = null;
+ }
if (updatedSince == null) {
updatedSince = null;
}
+ onSuccess || (onSuccess = function() {});
if (updatedSince !== null) {
data = {
updatedSince: updatedSince,