Update the notification count when updating the status of individual items
https://meta.codidact.com/posts/287765
This is an edge case, but it's probably not an infrequent one.
If you open a notification in another tab instead of in the same tab, the notification count doesn't decrement. That's known behavior. However, this meta post points out that the individual notification is marked as read, which means something on the page "noticed". Can that "something" update the number too, so they match?
Steps to reproduce, from https://meta.codidact.com/comments/thread/7848:
- Open a page in 2 tabs.
- Mark your top notification as unread.
- Close the notification panel and see the blue notification circle.
- Switch to the other tab and click on the unread notification.
- Switch back to the first tab and see the blue notification circle.
- Open the notifications panel and see the top notification switch back to read, but the blue notification circle remains.
(One of those notification counts very briefly passes through "0" before clearing. We've seen that before.)
General note: it's not like the page has "noticed", it's just that the actual list is loaded dynamically via AJAX. It'll be quite a bit more troublesome to make the prerendered count react to that (short of setting up server-side events or websocket connection).
Oh, I see. Do note the "priority: low" tag. I'm fine with not doing this.
Oh, I see. Do note the "priority: low" tag. I'm fine with not doing this.
Just going through issues and adding notes to those that I know the reason for things being the way they are 🙂