FIX: properly hide nav items

This commit is contained in:
Arpit Jalan 2018-03-30 12:32:29 +05:30
parent 15945bcf15
commit 67efdaea40

View File

@ -3,9 +3,9 @@ import { bufferedRender } from 'discourse-common/lib/buffered-render';
export default Ember.Component.extend(bufferedRender({
tagName: 'li',
classNameBindings: ['active', 'content.hasIcon:has-icon', 'content.classNames'],
classNameBindings: ['active', 'content.hasIcon:has-icon', 'content.classNames', 'hidden'],
attributeBindings: ['content.title:title'],
hidden: Em.computed.not('content.visible'),
hidden: false,
rerenderTriggers: ['content.count'],
@computed("content.filterMode", "filterMode")
@ -28,7 +28,7 @@ export default Ember.Component.extend(bufferedRender({
}
if (!this.get('active') && this.currentUser && this.currentUser.trust_level > 1 && (content.get('name') === "new" || content.get('name') === "unread") && (content.get('count') < 1)) {
return;
this.set('hidden', true);
}
buffer.push(`<a href='${href}'>`);