best preformance of notifications

This commit is contained in:
Eudes Inácio
2023-09-18 11:02:32 +01:00
parent 527cc0f2a6
commit 0a0cd8f85c
2 changed files with 12 additions and 2 deletions
+12 -1
View File
@@ -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)
})
}