Have a post-registration screen. Fix race in ChangeAvatar where if you hadn't got an initial avatar downloaded yet you couldn't update it after the component loaded.
This commit is contained in:
@@ -36,6 +36,16 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
|
||||
componentWillReceiveProps: function(newProps) {
|
||||
if (this.avatarSet) {
|
||||
// don't clobber what the user has just set
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
avatarUrl: newProps.initialAvatarUrl
|
||||
});
|
||||
},
|
||||
|
||||
setAvatarFromFile: function(file) {
|
||||
var newUrl = null;
|
||||
|
||||
|
||||
@@ -15,10 +15,14 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var MatrixClientPeg = require("../../MatrixClientPeg");
|
||||
|
||||
module.exports = {
|
||||
propTypes: {
|
||||
onFinished: React.PropTypes.func
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
onFinished: function() {},
|
||||
|
||||
Reference in New Issue
Block a user