Clear the 'screen' to load the main left/middle/right panels, then show the settings after post-reg is done

This commit is contained in:
Kegan Dougal 2015-11-20 14:27:39 +00:00
parent 37254e6243
commit 2e376b1eb9
2 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,6 @@ module.exports = React.createClass({
this.setState({busy: true}); this.setState({busy: true});
var self = this; var self = this;
cli.getProfileInfo(cli.credentials.userId).done(function(result) { cli.getProfileInfo(cli.credentials.userId).done(function(result) {
console.log("Avatar: %s", MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url));
self.setState({ self.setState({
avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url), avatarUrl: MatrixClientPeg.get().mxcUrlToHttp(result.avatar_url),
busy: false busy: false
@ -57,10 +56,6 @@ module.exports = React.createClass({
}); });
}, },
onProfileContinueClicked: function() {
console.log("onProfileContinueClicked");
},
render: function() { render: function() {
var ChangeDisplayName = sdk.getComponent('molecules.ChangeDisplayName'); var ChangeDisplayName = sdk.getComponent('molecules.ChangeDisplayName');
var ChangeAvatar = sdk.getComponent('molecules.ChangeAvatar'); var ChangeAvatar = sdk.getComponent('molecules.ChangeAvatar');
@ -76,7 +71,8 @@ module.exports = React.createClass({
Upload an avatar: Upload an avatar:
<ChangeAvatar <ChangeAvatar
initialAvatarUrl={this.state.avatarUrl} /> initialAvatarUrl={this.state.avatarUrl} />
<button onClick={this.onProfileContinueClicked}>Continue</button> <button onClick={this.props.onComplete}>Continue</button>
{this.state.errorString}
</div> </div>
</div> </div>
</div> </div>

View File

@ -118,6 +118,10 @@ module.exports = React.createClass({
onFinishPostRegistration: function() { onFinishPostRegistration: function() {
console.log("onFinishPostRegistration"); console.log("onFinishPostRegistration");
// Don't confuse this with "PageType" which is the middle window to show
this.setState({
screen: undefined
});
this.showScreen("settings"); this.showScreen("settings");
}, },