Honour the Groups feature flag

pull/5131/head
Luke Barnard 2017-09-29 10:39:49 +01:00
parent 9c86a655ca
commit 47919bc291
1 changed files with 5 additions and 2 deletions

View File

@ -19,9 +19,9 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import sdk from 'matrix-react-sdk'; import sdk from 'matrix-react-sdk';
import dis from 'matrix-react-sdk/lib/dispatcher'; import dis from 'matrix-react-sdk/lib/dispatcher';
import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton';
import Velocity from 'velocity-vector'; import Velocity from 'velocity-vector';
import 'velocity-vector/velocity.ui'; import 'velocity-vector/velocity.ui';
import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
const CALLOUT_ANIM_DURATION = 1000; const CALLOUT_ANIM_DURATION = 1000;
@ -170,6 +170,9 @@ module.exports = React.createClass({
const GroupsButton = sdk.getComponent('elements.GroupsButton'); const GroupsButton = sdk.getComponent('elements.GroupsButton');
const SettingsButton = sdk.getComponent('elements.SettingsButton'); const SettingsButton = sdk.getComponent('elements.SettingsButton');
const groupsButton = UserSettingsStore.isFeatureEnabled('feature_groups') ?
<GroupsButton tooltip={true} /> : null;
return ( return (
<div className="mx_BottomLeftMenu"> <div className="mx_BottomLeftMenu">
<div className="mx_BottomLeftMenu_options"> <div className="mx_BottomLeftMenu_options">
@ -183,7 +186,7 @@ module.exports = React.createClass({
<div ref={this._collectCreateRoomButton}> <div ref={this._collectCreateRoomButton}>
<CreateRoomButton tooltip={true} /> <CreateRoomButton tooltip={true} />
</div> </div>
<GroupsButton tooltip={true} /> { groupsButton }
<span className="mx_BottomLeftMenu_settings"> <span className="mx_BottomLeftMenu_settings">
<SettingsButton tooltip={true} /> <SettingsButton tooltip={true} />
</span> </span>