This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/site-map-category.js.es6
Robin Ward be9feeb918 Replace CurrentUserMixin with an injected currentUser
This is a lot simpler and removes the need for stubbing singletons
in unit tests.
2015-02-27 10:33:39 -05:00

11 lines
296 B
JavaScript

export default Ember.ObjectController.extend({
needs: ['site-map'],
unreadTotal: function() {
return parseInt(this.get('unreadTopics'), 10) +
parseInt(this.get('newTopics'), 10);
}.property('unreadTopics', 'newTopics'),
showTopicCount: Em.computed.not('currentUser')
});