From eba3f6b408ce3b2d9d80565803f4cb42ae17491c Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 1 Sep 2014 14:23:34 +0530 Subject: [PATCH] suppress post count on avatar for single post --- .../javascripts/discourse/components/topic-participant.js.es6 | 1 + .../javascripts/discourse/controllers/poster-expansion.js.es6 | 2 -- .../templates/components/topic-participant.js.handlebars | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/components/topic-participant.js.es6 b/app/assets/javascripts/discourse/components/topic-participant.js.es6 index a71091375..9db2b4b51 100644 --- a/app/assets/javascripts/discourse/components/topic-participant.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-participant.js.es6 @@ -1,6 +1,7 @@ export default Ember.Component.extend({ postStream: Em.computed.alias('participant.topic.postStream'), + showPostCount: Em.computed.gte('participant.post_count', 2), toggled: function() { return this.get('postStream.userFilters').contains(this.get('participant.username')); diff --git a/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 b/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 index 79ea40011..0ff553110 100644 --- a/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 +++ b/app/assets/javascripts/discourse/controllers/poster-expansion.js.es6 @@ -88,5 +88,3 @@ export default ObjectController.extend({ } }); - - diff --git a/app/assets/javascripts/discourse/templates/components/topic-participant.js.handlebars b/app/assets/javascripts/discourse/templates/components/topic-participant.js.handlebars index bcaf94525..344539d0a 100644 --- a/app/assets/javascripts/discourse/templates/components/topic-participant.js.handlebars +++ b/app/assets/javascripts/discourse/templates/components/topic-participant.js.handlebars @@ -1,4 +1,6 @@ - {{unbound participant.post_count}} + {{#if showPostCount}} + {{unbound participant.post_count}} + {{/if}} {{avatar participant imageSize="medium"}}