Closed phoebebright closed 6 years ago
Solved my other problem re updating with only new notices by adding
addclass: "noticeid_" + d.id,
and then check if it exists:
if ($(".noticeid_"+d.id).length == 0) {
Cool. I'm glad you found a solution. :)
I want my notifications to all be sticky so the only way to clear them is for the user to close them. This all works with the following settings until I need to refresh the list of notices.
What I would like to do is be able to check if the notice is in the DOM and only add new ones, but I don't see an obvious way of doing that, so I have used a brute force PNotify.removeAll(); and then reloaded everything. However, the removeAll is triggering the before_close so the notices are being marked as seen.
Would it be possible to have an additional user_hide parameter to indicate if the user closed the notice?