FIX: Don't show filter on user card if not in topic

This commit is contained in:
Robin Ward 2014-09-09 16:53:43 -04:00
parent a09ff29dd9
commit cec6b64a45
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import ObjectController from 'discourse/controllers/object';
export default ObjectController.extend({
needs: ['topic'],
needs: ['topic', 'application'],
visible: false,
user: null,
username: null,
@ -10,8 +10,10 @@ export default ObjectController.extend({
postStream: Em.computed.alias('controllers.topic.postStream'),
enoughPostsForFiltering: Em.computed.gte('participant.post_count', 2),
viewingTopic: Em.computed.match('controllers.application.currentPath', /^topic\./),
showFilter: Em.computed.and('viewingTopic', 'postStream.hasNoFilters', 'enoughPostsForFiltering'),
showFilter: Em.computed.and('postStream.hasNoFilters', 'enoughPostsForFiltering'),
// showFilter: Em.computed.and('postStream.hasNoFilters', 'enoughPostsForFiltering'),
showName: Discourse.computed.propertyNotEqual('user.name', 'user.username'),
hasUserFilters: Em.computed.gt('postStream.userFilters.length', 0),