mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve tinymce autosave and notification web click solved
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user