Removed synchro services

This commit is contained in:
Eudes Inácio
2021-10-19 09:41:06 +01:00
parent a4a730a87e
commit c7eada815d
17 changed files with 197 additions and 220 deletions
+5 -4
View File
@@ -12,7 +12,7 @@ import { ModalController, AlertController, AnimationController, Platform } from
import { NavigationExtras,Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { JsonStore } from './jsonStore.service';
import { synchro } from './socket/synchro.service';
import { BackgroundService } from './background.service';
import { v4 as uuidv4 } from 'uuid';
import { EventTrigger } from '../services/eventTrigger.service';
import { SessionStore } from '../store/session.service';
@@ -44,7 +44,8 @@ export class NotificationsService {
private zone: NgZone,
private activeroute: ActivatedRoute,
private jsonstore: JsonStore,
private eventtrigger: EventTrigger) {
private eventtrigger: EventTrigger,
private backgroundservice: BackgroundService) {
this.storageService.get("Notifications").then((value) => {
@@ -60,7 +61,7 @@ export class NotificationsService {
const id = uuidv4()
this.callbacks.push({type, funx, id})
if(!object.hasOwnProperty('desktop') && object['desktop'] != false) {
synchro.registerCallback('Notification',funx, type)
this.backgroundservice.registerBackService('Notification',funx, type)
}
return id;
@@ -178,7 +179,7 @@ export class NotificationsService {
})
var data = JSON.parse(message.payload);
synchro.$send(data)
//synchro.$send(data)
console.log('data.Service', data.Service); // module
console.log('data.IdObject', data.IdObject); // Object id