mkiol / GNotifier

Thunderbird add-on that replaces built-in notifications with the OS native notifications
https://addons.mozilla.org/thunderbird/addon/gnotifier/
GNU General Public License v3.0
164 stars 25 forks source link

[Thunderbird] Additional feed account creates notifications even with rss setting disabled #128

Closed Songworks closed 8 years ago

Songworks commented 8 years ago

In Thunderbird I've created a second rss feed account, but unlike the first one, your great addon creates notifications for this one even though the setting 'Notifications for RSS Feeds' is disabled.

I did a quick look to see how your addon determined if an account is an RSS feed or not and I might have found the problem:

In your source here it checks if the accounts folders last part equals the string 'Feeds'. So far I could gather, the first feeds account created in Thunderbird has the name 'Feeds'. But apparently subsequent accounts will not. In my case the new one got called 'Feeds-2-2'.

So, unless I misunderstood something, could you change the line to check if the folders name contains the string 'Feeds' rather than an equal?

Cheers!

Songworks commented 8 years ago

Did a quick test locally and changed the line to: var isRSS = (rootURIarr[rootURIarr.length-1].indexOf("Feeds") !== -1);

Seems to work for me.

mkiol commented 8 years ago

You are absolutely right. Thank you for your finding. I will update the code as you suggested.

mkiol commented 8 years ago

Fixed in the latest AMO release - 1.9.8.