Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State updates #73

Merged
merged 6 commits into from
May 14, 2019
Merged

State updates #73

merged 6 commits into from
May 14, 2019

Conversation

MichaelKim
Copy link
Member

Resolves #65

If a new version changes the shape of the state, we need to make sure any existing users' states will also be updated accordingly. To perform this patch, we create "updaters".

An updater is a function that accepts the state, modifies a certain part of the state, and returns it. Then, we can write an updater whenever there is a difference in state shape between two versions.

The new file updater.js will take the current version of the state, and perform updaters until it becomes up to date. These updates will only occur when the Background loads up. For users, this will only happen if MercuryWM is reloaded, reinstalled, or updated (automatically by Chrome).

@fg123 fg123 merged commit d7fa33a into master May 14, 2019
@fg123 fg123 deleted the state-updates branch May 14, 2019 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: State Updates on New Versions
2 participants