diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 6e0f74a4d..f1fd25269 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -98,38 +98,34 @@ export class HomePage implements OnInit { this.user = SessionStore.user; } - /* this.webNotificationPopupService.askNotificationPermission() */ - - this.NativeNotificationService.askForPermission() - - this.router.events.subscribe((val) => { - document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) - document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove()) - }); - - window['platform'] = platform - - window['inactivity/function'] = () => { - - if (window.location.pathname != '/inactivity') { + this.NativeNotificationService.askForPermission() + this.router.events.subscribe((val) => { document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) - document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove()) + document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove()) + }); - const pathname = window.location.pathname - SessionStore.setUrlBeforeInactivity(pathname) - - if (this.platform.is('mobileweb')) { - this.router.navigate(['/inactivity']); - }else{ - this.router.navigate(['/']); + window['platform'] = platform + + window['inactivity/function'] = () => { + + if (window.location.pathname != '/inactivity') { + + document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) + document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove()) + + const pathname = window.location.pathname + SessionStore.setUrlBeforeInactivity(pathname) + + if (this.platform.is('mobileweb')) { + this.router.navigate(['/inactivity']); + }else{ + this.router.navigate(['/']); + } } + } - } - - - } goto(url) { diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index d0f98aa15..ac3dbd8cb 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -257,6 +257,7 @@ export class InactivityPage implements OnInit { enterWithPasswordButton() { this.enterWithPassword = true + this.router.navigate(['/']); } }