Add UI for changing room avatars and update UI when room avatars change

This commit is contained in:
David Baker 2015-10-23 17:36:02 +01:00
parent e844b7aa21
commit 5392afdec4
3 changed files with 14 additions and 3 deletions

View file

@ -44,8 +44,8 @@ module.exports = React.createClass({
render: function() {
var style = {
'max-width': this.props.width,
'max-height': this.props.height,
maxWidth: this.props.width,
maxHeight: this.props.height,
};
return (
<img className="mx_RoomAvatar" src={this.state.imageUrl} onError={this.onError}

View file

@ -47,7 +47,11 @@ module.exports = React.createClass({
if (this.props.room && !this.avatarSet) {
avatarImg = <RoomAvatar room={this.props.room} width='320' height='240' resizeMethod='scale' />;
} else {
avatarImg = <img src={this.state.avatarUrl}/>;
var style = {
maxWidth: 320,
maxHeight: 240,
};
avatarImg = <img src={this.state.avatarUrl} style={style} />;
}
switch (this.state.phase) {