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 a710913753b..9db2b4b5145 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 79ea4001181..0ff55311097 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 bcaf945256e..344539d0a84 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"}}