You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Want a way to know when the user has read the notifications. This is so if you login to the site and not click the notifications on the top - they won't disappear. Right now they go away if you refresh the page (and don't check the notifications).
you can do a emit to:
var notificationDetails = {
'notification': 'read'
};
socket.emit('notification', notificationDetails);
This will let the live server know that all the notifications have been read.
This new way will not delete pending notifications until you send an emit to notification. This can probably be done when they click the notifications icon on the top.
If they don't click the notifications icon at the top and refresh - they will still see the notification.
After you've emitted this. On all the other clients that are listening, you'll get a message:
{
"type": "notification",
"action": "read"
}
When this happens - you can clear the notification bar in all of them. This is so when you have 2 chrome browsers open & you open them in one - it should remove the "14 notifications" in the other one.
The text was updated successfully, but these errors were encountered:
let me know when u add this. I won't push the new change until you've written the code (since it an get annoying to have notifications just not be deleted)
Want a way to know when the user has read the notifications. This is so if you login to the site and not click the notifications on the top - they won't disappear. Right now they go away if you refresh the page (and don't check the notifications).
you can do a emit to:
This will let the live server know that all the notifications have been read.
This new way will not delete pending notifications until you send an
emit
tonotification
. This can probably be done when they click the notifications icon on the top.If they don't click the notifications icon at the top and refresh - they will still see the notification.
After you've emitted this. On all the other clients that are listening, you'll get a message:
When this happens - you can clear the notification bar in all of them. This is so when you have 2 chrome browsers open & you open them in one - it should remove the "14 notifications" in the other one.
The text was updated successfully, but these errors were encountered: