Skip to content

Commit

Permalink
[FIX] "Discussion" label in Sidebar not hidden (#14682)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifantom authored and ggazzo committed Aug 20, 2019
1 parent 429b1ee commit 880e38b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/discussion/client/views/DiscussionList.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template name="DiscussionList">
{{#if rooms}}
<h3 class="rooms-list__type">
{{_ "Discussions"}}
</h3>
<ul class="rooms-list__list">
{{#each room in rooms}} {{> chatRoomItem room }} {{/each}}
</ul>
{{#if shouldAppear}}
{{#if rooms}}
<h3 class="rooms-list__type">
{{_ "Discussions"}}
</h3>
<ul class="rooms-list__list">
{{#each room in rooms}} {{> chatRoomItem room }} {{/each}}
</ul>
{{/if}}
{{/if}}
</template>
4 changes: 4 additions & 0 deletions app/discussion/client/views/DiscussionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ Template.DiscussionList.helpers({
query.prid = { $exists: true };
return ChatSubscription.find(query, { sort });
},

shouldAppear() {
return settings.get('Discussion_enabled');
},
});

0 comments on commit 880e38b

Please sign in to comment.