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(['/']); } } diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index cc38e35c0..74519ab76 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -115,10 +115,6 @@ export class LoginPage implements OnInit { loader.remove() - // login to API successfully - - console.log(attempt,'!!::!!'); - if (attempt) { if (attempt.UserId == SessionStore.user.UserId) { @@ -126,10 +122,9 @@ export class LoginPage implements OnInit { if(attempt.ChatData) { await this.authService.loginChat(attempt.ChatData.data); - //try { - await this.authService.loginToChatWs(); - // } catch(e) {} + await this.authService.loginToChatWs(); + } this.getToken();