Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d0dfc5d

Browse files
authored
Merge pull request #5849 from matrix-org/gsouquet-continue-previous-session
Move user to welcome_page if continuing with previous session
2 parents ac00c80 + 9081f80 commit d0dfc5d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/structures/auth/Registration.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ export default class Registration extends React.Component<IProps, IState> {
436436
// ok fine, there's still no session: really go to the login page
437437
this.props.onLoginClick();
438438
}
439+
440+
return sessionLoaded;
439441
};
440442

441443
private renderRegisterComponent() {
@@ -557,7 +559,12 @@ export default class Registration extends React.Component<IProps, IState> {
557559
loggedInUserId: this.state.differentLoggedInUserId,
558560
},
559561
)}</p>
560-
<p><AccessibleButton element="span" className="mx_linkButton" onClick={this.onLoginClickWithCheck}>
562+
<p><AccessibleButton element="span" className="mx_linkButton" onClick={async event => {
563+
const sessionLoaded = await this.onLoginClickWithCheck(event);
564+
if (sessionLoaded) {
565+
dis.dispatch({action: "view_welcome_page"});
566+
}
567+
}}>
561568
{_t("Continue with previous account")}
562569
</AccessibleButton></p>
563570
</div>;

0 commit comments

Comments
 (0)