From 0a0cd8f85cbb83ef8df563c3ac38ed67c8a3f8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Mon, 18 Sep 2023 11:02:32 +0100 Subject: [PATCH] best preformance of notifications --- src/app/services/notifications.service.ts | 13 ++++++++++++- src/app/shared/chat/new-group/new-group.page.ts | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index f868b7020..1ce81be58 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -180,6 +180,8 @@ export class NotificationsService { this.eventtrigger.publishSomeData({ notification: "recive" }) + }).catch((error) => { + console.log('save mobile notification erro', error) }) @@ -188,6 +190,8 @@ export class NotificationsService { this.eventtrigger.publishSomeData({ notification: "recive" }) + }).catch((error) => { + console.log('save web notification erro', error) }) } @@ -197,8 +201,15 @@ export class NotificationsService { }).catch((error) => { if (!error) { - this.storageService.store("Notifications", [notification]) + console.log('store not exist on notification service ', error) + this.storageService.store("Notifications", [notification]).then(() => { + this.eventtrigger.publishSomeData({ + notification: "recive" + }) + }) } + + console.log('store notification service error', error) }) } diff --git a/src/app/shared/chat/new-group/new-group.page.ts b/src/app/shared/chat/new-group/new-group.page.ts index 7ef1a1890..316bd585c 100644 --- a/src/app/shared/chat/new-group/new-group.page.ts +++ b/src/app/shared/chat/new-group/new-group.page.ts @@ -65,7 +65,6 @@ export class NewGroupPage implements OnInit{ console.log(this.task) - this if(this.task) { this.link = this.dataService.get("link");