Improve tinymce autosave and notification web click solved

This commit is contained in:
Eudes Inácio
2023-08-08 15:40:10 +01:00
parent 5cf48c1b2f
commit bf89e46841
10 changed files with 109 additions and 63 deletions
+36 -17
View File
@@ -188,25 +188,44 @@ export class NotificationsService {
}
onReciveBackground() {
if (!this.isPushNotificationsAvailable) {
return false
}
PushNotifications.addListener('pushNotificationActionPerformed',
(notification: ActionPerformed) => {
this.active = true
console.log('NOtification Listener Backgroud', notification)
/* this.DataArray.push(notification.notification)
this.storageService.store("Notifications", this.DataArray)
this.eventtrigger.publishSomeData({
notification: "recive"
}) */
this.notificatinsRoutes(notification)
// this.runNotificationCallback(notification)
if(this.platform.is('mobile')) {
if (!this.isPushNotificationsAvailable) {
return false
}
);
PushNotifications.addListener('pushNotificationActionPerformed',
(notification: ActionPerformed) => {
this.active = true
console.log('NOtification Listener Backgroud', notification)
/* this.DataArray.push(notification.notification)
this.storageService.store("Notifications", this.DataArray)
this.eventtrigger.publishSomeData({
notification: "recive"
}) */
this.notificatinsRoutes(notification)
// this.runNotificationCallback(notification)
}
);
} else {
navigator.serviceWorker.onmessage = (event) => {
console.log('Mensagem recebida do Service Worker:', event.data.data);
let object = {
notification: event.data
}
this.notificatinsRoutes(object)
// Implemente a lógica para lidar com a mensagem recebida do Service Worker
if (event.data.notificationClicked) {
console.log('Notificação push do Firebase clicada em segundo plano!');
// Implemente ações adicionais conforme necessário
}
};
}
}
ChatSendMessageNotification(userID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/sendbyUsername`;
@@ -250,7 +269,7 @@ export class NotificationsService {
notificatinsRoutes = (notification) => {
console.log('BACK BACK',notification)
if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) {