diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index 4b3cedf6e..dab387804 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -3,6 +3,7 @@ import { Router } from '@angular/router'; import { AnimationController, ModalController } from '@ionic/angular'; import { User } from 'src/app/models/user.model'; import { AuthService } from 'src/app/services/auth.service'; +import { ToastService } from 'src/app/services/toast.service'; import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page'; import { PinPage } from 'src/app/shared/pin/pin.page'; import { LocalstoreService } from 'src/app/store/localstore.service'; @@ -22,7 +23,8 @@ export class ProfilePage implements OnInit { private authService: AuthService, private animationController: AnimationController, private router: Router, - private localstoreService: LocalstoreService + private localstoreService: LocalstoreService, + private toastService: ToastService, ) { this.loggeduser = authService.ValidatedUser; @@ -41,14 +43,16 @@ export class ProfilePage implements OnInit { notImplemented(){} logout() { - alert('LOGOUT') + const loader = this.toastService.loading(); // clear local storage window.localStorage.clear(); setTimeout(()=>{ - window.location.pathname = '/' + window.location.pathname = '/'; location.reload(); - }, 1000) + this.router.navigate(['/']); + }, 1000); + loader.remove(); } diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index fdb05f95c..b7c75972d 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -40,7 +40,6 @@ export class NotificationsService { } getAndpostToken(username) { - alert('ALERT' + username) if (this.platform.is('desktop') || this.platform.is('mobileweb')) { console.log('Notifications not supported') } else {