valpackett / transmitter

A WebExtension for the Transmission BitTorrent client
The Unlicense
97 stars 15 forks source link

Don't create badge update alarm when Icon badge is set to Nothing #31

Closed nfriedly closed 3 years ago

nfriedly commented 3 years ago

The updateBadge() function exits early when the icon badge is off:

https://github.com/myfreeweb/transmitter/blob/5ee22239170790fcd1b1c7b54d23b0cfc2437691/background.js#L133-L137

But, I think it would be a little better to not set up the alarm at all in that case:

https://github.com/myfreeweb/transmitter/blob/5ee22239170790fcd1b1c7b54d23b0cfc2437691/background.js#L176-L188

Should I send in a PR with that change?

valpackett commented 3 years ago

Sure, I'll merge that, but I'm not planning on releasing an update to a.m.o right now