Update default value for desktop notifications
The default value in state for notifications is set to true, https://code.usgs.gov/ghsc/hazdev/earthquake-latest-earthquakes/-/blob/master/projects/earthquake-latest-earthquakes/src/app/state/settings/settings.state.ts
This is problematic because notifications cannot be enabled without the user granting the browser permissions to allow notifications.
To reproduce issue:
- Load the interface with it's default settings (and with Notifications set to "ask" in the browser)
- enable notifications
- accept the browser prompt
- disable notifications
- refresh the page with the current params stored in the URL
What happens is that the url is updated with updatedNotifications=true
when the browser prompt to allow notifications is accepted. However, since the default value is true, this shouldn't happen. Then when the setting is toggled off it removes this url parameter, which effectively hasn't changed the settings stored in state, since the absence of a url parameter indicates that the default should be used (which is the notifications turned on).