This commit is contained in:
tiago.kayaya
2022-03-28 13:34:01 +01:00
parent dd488c32e3
commit 80ddf8c764
6 changed files with 99 additions and 39 deletions
+8 -2
View File
@@ -30,6 +30,7 @@ import { WsChatService } from 'src/app/services/chat/ws-chat.service';
import { environment } from 'src/environments/environment';
import { v4 as uuidv4 } from 'uuid'
import { NativeNotificationService } from 'src/app/services/native-notification.service';
import { UserSession } from '../models/user.model';
@Component({
selector: 'app-home',
@@ -79,6 +80,7 @@ export class HomePage implements OnInit {
status: string = "";
audioName: string = "";
public user: UserSession;
constructor(
private router: Router,
@@ -102,12 +104,16 @@ export class HomePage implements OnInit {
private sqliteservice: SqliteService,
public RouteService: RouteService,
private WsChatService: WsChatService,
private NativeNotificationService: NativeNotificationService,) {
private NativeNotificationService: NativeNotificationService) {
if (SessionStore.exist) {
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())