Merge branch 'develop' into travis/granular-settings
This commit is contained in:
commit
c5c346f0b7
28 changed files with 2124 additions and 235 deletions
|
@ -43,18 +43,22 @@ class FlairAvatar extends React.Component {
|
|||
render() {
|
||||
const httpUrl = this.context.matrixClient.mxcUrlToHttp(
|
||||
this.props.groupProfile.avatarUrl, 16, 16, 'scale', false);
|
||||
const tooltip = this.props.groupProfile.name ?
|
||||
`${this.props.groupProfile.name} (${this.props.groupProfile.groupId})`:
|
||||
this.props.groupProfile.groupId;
|
||||
return <img
|
||||
src={httpUrl}
|
||||
width="16"
|
||||
height="16"
|
||||
onClick={this.onClick}
|
||||
title={this.props.groupProfile.groupId} />;
|
||||
title={tooltip} />;
|
||||
}
|
||||
}
|
||||
|
||||
FlairAvatar.propTypes = {
|
||||
groupProfile: PropTypes.shape({
|
||||
groupId: PropTypes.string.isRequired,
|
||||
name: PropTypes.string,
|
||||
avatarUrl: PropTypes.string.isRequired,
|
||||
}),
|
||||
};
|
||||
|
@ -79,9 +83,7 @@ export default class Flair extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
this._unmounted = false;
|
||||
if (SettingsStore.isFeatureEnabled('feature_groups') && FlairStore.groupSupport()) {
|
||||
this._generateAvatars();
|
||||
}
|
||||
this._generateAvatars();
|
||||
this.context.matrixClient.on('RoomState.events', this.onRoomStateEvents);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue