From 3437c190274e05cbd343ec10fad7e89963593d94 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 31 Aug 2021 19:31:46 +0100 Subject: [PATCH] remove notification for mobile --- src/app/services/notifications.service.ts | 4 +++- src/app/services/socket/synchro.service.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index cf7d3197c..d04433176 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -54,7 +54,9 @@ export class NotificationsService { registerCallback(type: string, funx: Function, object: any = {} ) { this.callbacks.push({type, funx}) - synchro.registerCallback('Notification',funx, type) + if(!object.hasOwnProperty('desktop') && object['desktop'] != false) { + synchro.registerCallback('Notification',funx, type) + } } diff --git a/src/app/services/socket/synchro.service.ts b/src/app/services/socket/synchro.service.ts index 88eb2d374..dd19ac1f2 100644 --- a/src/app/services/socket/synchro.service.ts +++ b/src/app/services/socket/synchro.service.ts @@ -133,8 +133,8 @@ class SynchroService { if(idConnection != this.id ) { - //if(window['platform'].is('desktop') || this.platform.is('mobileweb')) {} - //else return false + if(window['platform'].is('desktop') || this.platform.is('mobileweb')) {} + else return false if(environment.production) return false