Fix inactivity goBack

This commit is contained in:
Peter Maquiran
2021-08-31 10:27:00 +01:00
parent 6ffccfa8b3
commit 0975255744
+8 -3
View File
@@ -77,8 +77,8 @@ export class InactivityPage implements OnInit {
// if current attemp is equal to the current user
if (attempt.UserId == SessionStore.user.UserId) {
await this.authService.SetSession(attempt, this.userattempt);
await this.authService.loginChat(this.userattempt);
await this.getToken();
this.authService.loginChat(this.userattempt);
this.getToken();
SessionStore.setInativity(true)
this.goback()
@@ -143,7 +143,12 @@ export class InactivityPage implements OnInit {
goback() {
const pathName = this.SessionStore.user.UrlBeforeInactivity
this.router.navigate([pathName]);
if(pathName) {
this.router.navigate([pathName]);
} else {
this.router.navigate(['/home/events']);
}
}
storePin() {