diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index 3f374b699..9edec4567 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -212,8 +212,9 @@ export class ProfilePage implements OnInit { } logout() { - window.localStorage.clear(); - SessionStore.delete(); + + SessionStore.setInativity(false) + this.router.navigateByUrl('/inactivity'); setTimeout(() => { this.router.navigateByUrl('/', { replaceUrl: true }); diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index f573ce7fa..4c3a98682 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -83,6 +83,7 @@ export class InactivityPage implements OnInit { this.goback() } else { SessionStore.delete() + window.localStorage.clear(); await this.authService.SetSession(attempt, this.userattempt); } diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 2ee6ef65d..611ab013a 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -47,8 +47,6 @@ export class HeaderPage implements OnInit { } else { this.notificationLengthData(); } - - }