@@ -19,6 +19,7 @@ import PropTypes from 'prop-types';
1919import { MatrixClientPeg } from "../../../MatrixClientPeg" ;
2020import * as sdk from '../../../index' ;
2121import { _t } from '../../../languageHandler' ;
22+ import Spinner from '../elements/Spinner' ;
2223
2324export default class ChangeAvatar extends React . Component {
2425 static propTypes = {
@@ -58,7 +59,7 @@ export default class ChangeAvatar extends React.Component {
5859 }
5960
6061 // TODO: [REACT-WARNING] Replace with appropriate lifecycle event
61- UNSAFE_componentWillReceiveProps ( newProps ) {
62+ UNSAFE_componentWillReceiveProps ( newProps ) { // eslint-disable-line camelcase
6263 if ( this . avatarSet ) {
6364 // don't clobber what the user has just set
6465 return ;
@@ -143,7 +144,9 @@ export default class ChangeAvatar extends React.Component {
143144 // time to propagate through to the RoomAvatar.
144145 if ( this . props . room && ! this . avatarSet ) {
145146 const RoomAvatar = sdk . getComponent ( 'avatars.RoomAvatar' ) ;
146- avatarImg = < RoomAvatar room = { this . props . room } width = { this . props . width } height = { this . props . height } resizeMethod = 'crop' /> ;
147+ avatarImg = < RoomAvatar
148+ room = { this . props . room } width = { this . props . width } height = { this . props . height } resizeMethod = 'crop'
149+ /> ;
147150 } else {
148151 const BaseAvatar = sdk . getComponent ( "avatars.BaseAvatar" ) ;
149152 // XXX: FIXME: once we track in the JS what our own displayname is(!) then use it here rather than ?
@@ -174,9 +177,8 @@ export default class ChangeAvatar extends React.Component {
174177 </ div >
175178 ) ;
176179 case ChangeAvatar . Phases . Uploading :
177- var Loader = sdk . getComponent ( "elements.Spinner" ) ;
178180 return (
179- < Loader />
181+ < Spinner />
180182 ) ;
181183 }
182184 }
0 commit comments