Small fixes

This commit is contained in:
RainLoop Team 2014-01-22 22:55:17 +04:00
parent bd935eae32
commit 1623f515ff
10 changed files with 47 additions and 15 deletions

View file

@ -265,6 +265,16 @@ FolderModel.prototype.initComputed = function ()
'owner': this
});
this.hasUnreadMessages = ko.computed(function () {
return 0 < this.messageCountUnread();
}, this);
this.hasSubScribedUnreadMessagesSubfolders = ko.computed(function () {
return !!_.find(this.subFolders(), function (oFolder) {
return oFolder.hasUnreadMessages() || oFolder.hasSubScribedUnreadMessagesSubfolders();
});
}, this);
return this;
};