Merge pull request #1553 from matrix-org/luke/groups-fix-initial-avatar
Fix initial in GroupAvatar in GroupViewpull/21833/head
						commit
						9dd77af5ef
					
				|  | @ -884,6 +884,7 @@ export default React.createClass({ | |||
|                 } else { | ||||
|                     const GroupAvatar = sdk.getComponent('avatars.GroupAvatar'); | ||||
|                     avatarImage = <GroupAvatar groupId={this.props.groupId} | ||||
|                         groupName={this.state.profileForm.name} | ||||
|                         groupAvatarUrl={this.state.profileForm.avatar_url} | ||||
|                         width={48} height={48} resizeMethod='crop' | ||||
|                     />; | ||||
|  | @ -928,9 +929,11 @@ export default React.createClass({ | |||
|                      dir="auto" />; | ||||
|             } else { | ||||
|                 const groupAvatarUrl = summary.profile ? summary.profile.avatar_url : null; | ||||
|                 const groupName = summary.profile ? summary.profile.name : null; | ||||
|                 avatarNode = <GroupAvatar | ||||
|                     groupId={this.props.groupId} | ||||
|                     groupAvatarUrl={groupAvatarUrl} | ||||
|                     groupName={groupName} | ||||
|                     onClick={this._onEditClick} | ||||
|                     width={48} height={48} | ||||
|                 />; | ||||
|  |  | |||
|  | @ -24,6 +24,7 @@ export default React.createClass({ | |||
| 
 | ||||
|     propTypes: { | ||||
|         groupId: PropTypes.string, | ||||
|         groupName: PropTypes.string, | ||||
|         groupAvatarUrl: PropTypes.string, | ||||
|         width: PropTypes.number, | ||||
|         height: PropTypes.number, | ||||
|  | @ -57,7 +58,7 @@ export default React.createClass({ | |||
| 
 | ||||
|         return ( | ||||
|             <BaseAvatar | ||||
|                 name={this.props.groupId[1]} | ||||
|                 name={this.props.groupName || this.props.groupId[1]} | ||||
|                 idName={this.props.groupId} | ||||
|                 url={this.getGroupAvatarUrl()} | ||||
|                 {...otherProps} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 David Baker
						David Baker