Add width/height/resizeMethod params

pull/21833/head
David Baker 2017-09-25 14:51:21 +01:00
parent 5b312ffb03
commit 58ec732fb3
2 changed files with 11 additions and 2 deletions

View File

@ -152,10 +152,15 @@ module.exports = withMatrixClient(React.createClass({
</div>; </div>;
} }
const avatarUrl = this.props.matrixClient.mxcUrlToHttp(
this.props.groupMember.avatarUrl,
36, 36, 'crop'
);
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar'); const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const avatar = ( const avatar = (
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36} <BaseAvatar name={this.props.groupMember.userId} width={36} height={36}
url={this.props.matrixClient.mxcUrlToHttp(this.props.groupMember.avatarUrl)} url={avatarUrl}
/> />
); );

View File

@ -48,11 +48,15 @@ export default withMatrixClient(React.createClass({
const EntityTile = sdk.getComponent('rooms.EntityTile'); const EntityTile = sdk.getComponent('rooms.EntityTile');
const name = this.props.member.displayname || this.props.member.userId; const name = this.props.member.displayname || this.props.member.userId;
const avatarUrl = this.props.matrixClient.mxcUrlToHttp(
this.props.member.avatarUrl,
36, 36, 'crop'
);
const av = ( const av = (
<BaseAvatar name={this.props.member.userId} <BaseAvatar name={this.props.member.userId}
width={36} height={36} width={36} height={36}
url={this.props.matrixClient.mxcUrlToHttp(this.props.member.avatarUrl)} url={avatarUrl}
/> />
); );