plugins-legacy icon indicating copy to clipboard operation
plugins-legacy copied to clipboard

googlevoice - fix badge to clear when there are no more unread messages

Open jantman opened this issue 8 years ago • 0 comments

In the Google Voice UI, the message count (document.querySelector('.msgCount')) is an empty string if there are 0 new messages. With the current code, this means that the if (count) { branch is never executed... so the result is that the badge never goes away, because if you read all your messages the .msgCount div is completely empty.

This is a simple attempt to fix that; if the msgCount div empty, the message count should be 0, so setBadge(0).

jantman avatar Dec 17 '16 12:12 jantman