Merge pull request #1549 from matrix-org/luke/groups-fix-mygroups-avatar-scale-method

Use "crop" method to scale group avatars in MyGroups
This commit is contained in:
David Baker 2017-10-27 18:40:19 +01:00 committed by GitHub
commit 580d8dce19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,9 @@ const GroupTile = React.createClass({
const profile = this.state.profile || {};
const name = profile.name || this.props.groupId;
const desc = profile.shortDescription;
const httpUrl = profile.avatarUrl ? this.context.matrixClient.mxcUrlToHttp(profile.avatarUrl, 50, 50) : null;
const httpUrl = profile.avatarUrl ? this.context.matrixClient.mxcUrlToHttp(
profile.avatarUrl, 50, 50, "crop",
) : null;
return <AccessibleButton className="mx_GroupTile" onClick={this.onClick}>
<div className="mx_GroupTile_avatar">
<BaseAvatar name={name} url={httpUrl} width={50} height={50} />