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

[menu-bar] Fix user default preferences storage migration #90

Merged

Conversation

gabrieldonadel
Copy link
Member

@gabrieldonadel gabrieldonadel commented Oct 23, 2023

Why

When migrating from v0.1.3 to latest default user preferences are not applied, causing the user to see no simulators/emulators in the menu bar

image

How

Update getUserPreferences to merge the retrieved object from mmkv with the default preferences, this ensures that in case we add new keys to UserPreferences getUserPreferences will always return the whole object with the default values

Test Plan

  1. Reset local storage
  2. install Orbit v0.1.3
  3. Open the Settings Window and change some configuration (e.g. Run Android emulator without audio)
  4. Install orbit from main
  5. Check if ios and android platforms are enabled

@gabrieldonadel gabrieldonadel marked this pull request as ready for review October 23, 2023 21:04
@gabrieldonadel gabrieldonadel merged commit 3ea30a0 into main Oct 23, 2023
1 check failed
@gabrieldonadel gabrieldonadel deleted the @gabrieldonadel/fix-user-preferences-storage-migration branch October 23, 2023 21:04
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.

None yet

1 participant