Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Weblate 2017-10-30 15:12:25 +00:00
commit e5a88dc04e
2 changed files with 5 additions and 1 deletions

View file

@ -884,6 +884,7 @@ export default React.createClass({
} else { } else {
const GroupAvatar = sdk.getComponent('avatars.GroupAvatar'); const GroupAvatar = sdk.getComponent('avatars.GroupAvatar');
avatarImage = <GroupAvatar groupId={this.props.groupId} avatarImage = <GroupAvatar groupId={this.props.groupId}
groupName={this.state.profileForm.name}
groupAvatarUrl={this.state.profileForm.avatar_url} groupAvatarUrl={this.state.profileForm.avatar_url}
width={48} height={48} resizeMethod='crop' width={48} height={48} resizeMethod='crop'
/>; />;
@ -928,9 +929,11 @@ export default React.createClass({
dir="auto" />; dir="auto" />;
} else { } else {
const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null;
const groupName = summary.profile ? summary.profile.name : null;
avatarNode = <GroupAvatar avatarNode = <GroupAvatar
groupId={this.props.groupId} groupId={this.props.groupId}
groupAvatarUrl={groupAvatarUrl} groupAvatarUrl={groupAvatarUrl}
groupName={groupName}
onClick={this._onEditClick} onClick={this._onEditClick}
width={48} height={48} width={48} height={48}
/>; />;

View file

@ -24,6 +24,7 @@ export default React.createClass({
propTypes: { propTypes: {
groupId: PropTypes.string, groupId: PropTypes.string,
groupName: PropTypes.string,
groupAvatarUrl: PropTypes.string, groupAvatarUrl: PropTypes.string,
width: PropTypes.number, width: PropTypes.number,
height: PropTypes.number, height: PropTypes.number,
@ -57,7 +58,7 @@ export default React.createClass({
return ( return (
<BaseAvatar <BaseAvatar
name={this.props.groupId[1]} name={this.props.groupName || this.props.groupId[1]}
idName={this.props.groupId} idName={this.props.groupId}
url={this.getGroupAvatarUrl()} url={this.getGroupAvatarUrl()}
{...otherProps} {...otherProps}