Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1603 from matrix-org/luke/groups-enable
Browse files Browse the repository at this point in the history
Make groups a fully-fleged baked-in feature
  • Loading branch information
lukebarnard1 committed Nov 10, 2017
2 parents b68b60c + a96bfee commit b3ddec4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module.exports = {
// This just uses the react plugin to help eslint known when
// variables have been used in JSX
"react/jsx-uses-vars": "error",
// Don't mark React as unused if we're using JSX
"react/jsx-uses-react": "error",

// bind or arrow function in props causes performance issues
"react/jsx-no-bind": ["error", {
Expand Down
4 changes: 0 additions & 4 deletions src/UserSettingsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ import SdkConfig from './SdkConfig';
*/

const FEATURES = [
{
id: 'feature_groups',
name: _td("Communities"),
},
{
id: 'feature_pinning',
name: _td("Message Pinning"),
Expand Down
5 changes: 1 addition & 4 deletions src/components/views/elements/Flair.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import {MatrixClient} from 'matrix-js-sdk';
import UserSettingsStore from '../../../UserSettingsStore';
import FlairStore from '../../../stores/FlairStore';
import dis from '../../../dispatcher';

Expand Down Expand Up @@ -83,9 +82,7 @@ export default class Flair extends React.Component {

componentWillMount() {
this._unmounted = false;
if (UserSettingsStore.isFeatureEnabled('feature_groups') && FlairStore.groupSupport()) {
this._generateAvatars();
}
this._generateAvatars();
this.context.matrixClient.on('RoomState.events', this.onRoomStateEvents);
}

Expand Down
1 change: 1 addition & 0 deletions src/components/views/elements/GroupsButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import React from 'react';
import sdk from '../../../index';
import PropTypes from 'prop-types';
import { _t } from '../../../languageHandler';
Expand Down
12 changes: 5 additions & 7 deletions src/components/views/rooms/RoomSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,11 @@ module.exports = React.createClass({

const self = this;

let relatedGroupsSection;
if (UserSettingsStore.isFeatureEnabled('feature_groups')) {
relatedGroupsSection = <RelatedGroupSettings ref="related_groups"
roomId={this.props.room.roomId}
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')} />;
}
const relatedGroupsSection = <RelatedGroupSettings ref="related_groups"
roomId={this.props.room.roomId}
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')}
/>;

let userLevelsSection;
if (Object.keys(user_levels).length) {
Expand Down

0 comments on commit b3ddec4

Please sign in to comment.