This commit is contained in:
Peter Maquiran
2023-01-04 14:45:17 +01:00
parent 2f13e82c96
commit 0d485672d8
3 changed files with 38 additions and 26 deletions
+12
View File
@@ -31,6 +31,7 @@ export class ProfilePage implements OnInit {
location: "Gabinete";
isProfileOpen = false
hideImage = false
logoutOut = false
constructor(private modalController: ModalController,
private authService: AuthService,
@@ -47,6 +48,7 @@ export class ProfilePage implements OnInit {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
this.isProfileOpen = false
this.logoutOut = true
});
setTimeout(()=>{
@@ -210,9 +212,19 @@ export class ProfilePage implements OnInit {
logout() {
SessionStore.setInativity(false)
SessionStore.setUrlBeforeInactivity(this.router.url);
this.logoutOut == false
setTimeout(() => {
// alert('logout')
this.router.navigateByUrl('/', { replaceUrl: true });
this.router.navigate(['/']);
setTimeout(() =>{
if(this.logoutOut == false) {
window.location.pathname = '/'
}
}, 500)
}, 100)
}