bugs solved

This commit is contained in:
Eudes Inácio
2023-08-11 16:14:25 +01:00
parent 2bfec82113
commit 408f68b22e
20 changed files with 263 additions and 129 deletions
+3 -2
View File
@@ -26,8 +26,8 @@ messaging.onBackgroundMessage(function(payload) {
body: payload.notification.body,
};
self.registration.showNotification(notificationTitle,
notificationOptions);
/* self.registration.showNotification(notificationTitle,
notificationOptions); */
});
@@ -63,6 +63,7 @@ self.addEventListener('notificationclick', function(event) {
console.log("Push Clicked ", event);
// Enviar uma mensagem para o cliente (componente)
self.clients.matchAll().then((clients) => {
console.log("Push Clicked 2", clients);
if (clients && clients.length) {
clients.forEach((client) => {
client.postMessage({ notificationClicked: true });