Skip to content

Commit

Permalink
[FIX] Hide threads button when disabled (RocketChat#14796)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarmal committed Jul 10, 2019
1 parent da42a95 commit c55747c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/ui-flextab/client/flexTabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import _ from 'underscore';
import { hasAllPermission } from '../../authorization';
import { popover, TabBar, Layout } from '../../ui-utils';
import { t } from '../../utils';
import { settings } from '../../settings';

const commonHelpers = {
title() {
Expand Down Expand Up @@ -55,6 +56,9 @@ const filterButtons = (button, anonymous, rid) => {
if (button.id === 'addUsers' && !canShowAddUsersButton(rid)) {
return false;
}
if (button.id === 'thread' && !settings.get('Threads_enabled')) {
return false;
}
return true;
};
Template.flexTabBar.helpers({
Expand Down

0 comments on commit c55747c

Please sign in to comment.