invidious
invidious copied to clipboard
[Bug] Notifications: True
I've decided to submit my personal favorite inconsequential bug. This is low priority to be sure.
The notifications bell will occasionally show the number of notification as "TRUE" instead of any actual number. I have not managed to find a consistent reason as to why. I can confirm this occurring on multiple instances (vid.puffyan.us and yewtu.be at the least).

Browser: Mozilla Firefox 107.0 OS: Linux Mint 20.3 Cinnamon
Notifications are forcibly disabled on yewtu.be.
Oh, right, thanks! I've already seen that bug occurring, but completely forgot to open an issue!
@unixfox This is happening on other instances too!
I have reproduced it by force closing the browser when it shows a number, running it, restoring the tabs, and viewing a restored tab that has an Invidious page in it.
Not sure if this is the issue, but looking at the source code I see a function function update_ticker_count() that is setting a variable const notification_count = helpers.storage.get(STORAGE_KEY_STREAM); to the value of something that isn't the notification count...
I suspect the correct code would be something more like const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT) || 0;