-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
There are two problems with the current implementation of local storage. This is how it works at the moment:
$scope.$storage = $localStorage.$default({
config: urlConfig || clockConfig
});
That is, it takes values from localstorage first, if it is not there, it takes the default fallback, which is either the configuration from the url, or, as last resort, the config file.
updating code base
If clock has updates in its codebase that is incompatible with historic configs, users that have used the clock before already have some stuff in their localstorage. These users never get the new config. Worse, their stored config may break the clock entirely.
development
During development it is often useful to test with different configurations. Clearing localstorage every time takes a long time
Proposal
- add a version to the config, so that if the version in localstorage is different than the version in the config file, the file takes precedence
- add a flag to disable localstorage entirely (see Adding a setting that allows to remember the config in local storage (or not) #24)
Metadata
Metadata
Assignees
Labels
No labels