1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Decide on which screen to show after login in one place

This follows from a small amount of refactoring done when RTS was introduced. Instead of setting the screen after sync, do it only after login.

This requires as-yet-to-be-PRd riot-web changes.

This includes:
 - initialScreenAfterLogin, which can be used to set the screen after login, and represents the screen that would be viewed if the window.location at the time of initialising Riot were routed.
 - guestCreds are now part of state, because otherwise they don't cause the login/registration views to update when set.
 - instead of worrying about races and using this._setPage, use a dispatch.
This commit is contained in:
Luke Barnard
2017-03-08 10:25:54 +00:00
parent 49c66d8645
commit 06a05c351d
2 changed files with 44 additions and 36 deletions

View File

@ -192,7 +192,6 @@ module.exports = React.createClass({
const teamToken = data.team_token;
// Store for use /w welcome pages
window.localStorage.setItem('mx_team_token', teamToken);
this.props.onTeamMemberRegistered(teamToken);
this._rtsClient.getTeam(teamToken).then((team) => {
console.log(