Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
7cada3b227
5 changed files with 9 additions and 15 deletions
|
@ -33,6 +33,8 @@ module.exports = {
|
||||||
// This just uses the react plugin to help eslint known when
|
// This just uses the react plugin to help eslint known when
|
||||||
// variables have been used in JSX
|
// variables have been used in JSX
|
||||||
"react/jsx-uses-vars": "error",
|
"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
|
// bind or arrow function in props causes performance issues
|
||||||
"react/jsx-no-bind": ["error", {
|
"react/jsx-no-bind": ["error", {
|
||||||
|
|
|
@ -26,10 +26,6 @@ import SdkConfig from './SdkConfig';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const FEATURES = [
|
const FEATURES = [
|
||||||
{
|
|
||||||
id: 'feature_groups',
|
|
||||||
name: _td("Communities"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'feature_pinning',
|
id: 'feature_pinning',
|
||||||
name: _td("Message Pinning"),
|
name: _td("Message Pinning"),
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import {MatrixClient} from 'matrix-js-sdk';
|
import {MatrixClient} from 'matrix-js-sdk';
|
||||||
import UserSettingsStore from '../../../UserSettingsStore';
|
|
||||||
import FlairStore from '../../../stores/FlairStore';
|
import FlairStore from '../../../stores/FlairStore';
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
|
|
||||||
|
@ -83,9 +82,7 @@ export default class Flair extends React.Component {
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this._unmounted = false;
|
this._unmounted = false;
|
||||||
if (UserSettingsStore.isFeatureEnabled('feature_groups') && FlairStore.groupSupport()) {
|
this._generateAvatars();
|
||||||
this._generateAvatars();
|
|
||||||
}
|
|
||||||
this.context.matrixClient.on('RoomState.events', this.onRoomStateEvents);
|
this.context.matrixClient.on('RoomState.events', this.onRoomStateEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
|
|
|
@ -671,13 +671,11 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
let relatedGroupsSection;
|
const relatedGroupsSection = <RelatedGroupSettings ref="related_groups"
|
||||||
if (UserSettingsStore.isFeatureEnabled('feature_groups')) {
|
roomId={this.props.room.roomId}
|
||||||
relatedGroupsSection = <RelatedGroupSettings ref="related_groups"
|
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
|
||||||
roomId={this.props.room.roomId}
|
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')}
|
||||||
canSetRelatedGroups={roomState.mayClientSendStateEvent("m.room.related_groups", cli)}
|
/>;
|
||||||
relatedGroupsEvent={this.props.room.currentState.getStateEvents('m.room.related_groups', '')} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
let userLevelsSection;
|
let userLevelsSection;
|
||||||
if (Object.keys(user_levels).length) {
|
if (Object.keys(user_levels).length) {
|
||||||
|
|
Loading…
Reference in a new issue