From 193bf62dee193f6ba3f1847a14fd988299bc9d4d Mon Sep 17 00:00:00 2001 From: riking Date: Thu, 5 Feb 2015 14:53:36 -0800 Subject: [PATCH] FIX: 'all' filter never de-highlighting --- .../javascripts/discourse/views/activity-filter.js.es6 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/views/activity-filter.js.es6 b/app/assets/javascripts/discourse/views/activity-filter.js.es6 index 52505710b..8fe07f7e6 100644 --- a/app/assets/javascripts/discourse/views/activity-filter.js.es6 +++ b/app/assets/javascripts/discourse/views/activity-filter.js.es6 @@ -7,12 +7,17 @@ export default Ember.Component.extend(StringBuffer, { rerenderTriggers: ['content.count', 'count'], noGlyph: Em.computed.empty('icon'), + isIndexStream: function() { + return !this.get('content'); + }.property('content.count'), + active: function() { + if (this.get('isIndexStream')) { + return !this.get('userActionType'); + } var content = this.get('content'); if (content) { return parseInt(this.get('userActionType'), 10) === parseInt(Em.get(content, 'action_type'), 10); - } else { - return this.get('indexStream'); } }.property('userActionType', 'indexStream'),