mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
Merge pull request #3173 from riking/patch-user
FIX: 'all' filter never de-highlighting
This commit is contained in:
commit
178efdf882
@ -7,12 +7,17 @@ export default Ember.Component.extend(StringBuffer, {
|
|||||||
rerenderTriggers: ['content.count', 'count'],
|
rerenderTriggers: ['content.count', 'count'],
|
||||||
noGlyph: Em.computed.empty('icon'),
|
noGlyph: Em.computed.empty('icon'),
|
||||||
|
|
||||||
|
isIndexStream: function() {
|
||||||
|
return !this.get('content');
|
||||||
|
}.property('content.count'),
|
||||||
|
|
||||||
active: function() {
|
active: function() {
|
||||||
|
if (this.get('isIndexStream')) {
|
||||||
|
return !this.get('userActionType');
|
||||||
|
}
|
||||||
var content = this.get('content');
|
var content = this.get('content');
|
||||||
if (content) {
|
if (content) {
|
||||||
return parseInt(this.get('userActionType'), 10) === parseInt(Em.get(content, 'action_type'), 10);
|
return parseInt(this.get('userActionType'), 10) === parseInt(Em.get(content, 'action_type'), 10);
|
||||||
} else {
|
|
||||||
return this.get('indexStream');
|
|
||||||
}
|
}
|
||||||
}.property('userActionType', 'indexStream'),
|
}.property('userActionType', 'indexStream'),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user