notification

This commit is contained in:
Peter Maquiran
2022-01-26 17:28:55 +01:00
parent 58a32f45d4
commit 66098ae4e8
5 changed files with 87 additions and 15 deletions
+5 -1
View File
@@ -29,6 +29,7 @@ import { RouteService } from 'src/app/services/route.service';
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';
@Component({
selector: 'app-home',
@@ -100,10 +101,13 @@ export class HomePage implements OnInit {
private screenOrientation: ScreenOrientation,
private sqliteservice: SqliteService,
private RouteService: RouteService,
private WsChatService: WsChatService) {
private WsChatService: WsChatService,
private NativeNotificationService: NativeNotificationService) {
/* 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())