Firefox extension dev: observing preferencies, avoid multiple notifications
- by Michael
Let's say my Firefox extension has multiple preferences, but some of them are grouped, like check interval, fail retry interval, destination url. Those are used in just single function.
When I subscribe to preference service and add observer, the observe callback will be called for each changed preference, so if by chance user changed all of the settings in group, then I will have to do the same routine for the same subsystem as many times as I have items in that preferences group.
What I want is observe to be called just once for group of preferences. Say
extensions.myextension.interval1
extensions.myextension.site
extensions.myextension.retry
so if one or all of those preferences are changed, I receive only 1 notification about it.