as far as I remember, I opened this message yesterday but didn't notice whether there was this indicator count showing or not(even if, I'm pretty sure there wasn't any -ve count), but today morning I saw this -ve count over there.
Limiting it is probably handled correctly, I hope, in the backend, but the frontend could just be getting confused as a result of updates arriving at different relative times and/or updates that particular tab didn't receive. While knowing the actual cause is helpful, the general solution is to have the code not permit it to be displayed as < 0, as any such value is invalid. Ideally, the frontend software upon seeing such an invalid value would trigger an AJAX call to get the correct, current value from the backend.
Is it showing like that in only one tab, or does it show that way when you open a new page/tab (i.e. is it a single tab/page that's confused or is the number invalid in the database and persistent on multiple pages when you open them)?
This site is intended for bugs, features, and discussion of Stack Overflow and the software that powers it. You must have an account on Stack Overflow to participate.