Commit eed28b02 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): issue with redirection

1 merge request!674Onboarding
Pipeline #107525276 passed with stages
in 86 minutes and 27 seconds
......@@ -113,7 +113,10 @@ export class Minds {
this.minds.user.language,
this.minds.language
);
window.location.reload(true);
setTimeout(() => {
window.location.reload(true);
});
}
}
});
......
......@@ -85,6 +85,7 @@ export class RegisterComponent implements OnInit, OnDestroy {
registered() {
if (this.redirectTo) {
this.navigateToRedirection();
return;
}
this.router.navigate(['/' + this.session.getLoggedInUser().username]);
......
......@@ -143,8 +143,8 @@ export class RegisterForm implements OnInit {
// TODO: [emi/sprint/bison] Find a way to reset controls. Old implementation throws Exception;
this.inProgress = false;
this.done.next(data.user);
this.session.login(data.user);
this.done.next(data.user);
})
.catch(e => {
console.log(e);
......
......@@ -30,6 +30,7 @@ export class OnboardingComponent implements OnDestroy {
},
];
showTitle: boolean = false;
shown: boolean = false;
constructor(
private session: Session,
......@@ -45,6 +46,10 @@ export class OnboardingComponent implements OnDestroy {
if (section === 'notice') {
this.showTitle = false;
} else {
if (!this.shown) {
this.shown = true;
this.onboardingService.shown();
}
this.showTitle = true;
for (const item of this.steps) {
......@@ -73,7 +78,6 @@ export class OnboardingComponent implements OnDestroy {
this.router.navigate(['/newsfeed/subscriptions']);
}
this.onboardingService.shown();
this.topbarService.toggleVisibility(false);
this.sidebarMarkersService.toggleVisibility(false);
}
......
Please register or to comment