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

Migrate SharedPreferences to DataStore #2930

Open
kelvin-ngure opened this issue Dec 19, 2023 · 1 comment · May be fixed by #3205
Open

Migrate SharedPreferences to DataStore #2930

kelvin-ngure opened this issue Dec 19, 2023 · 1 comment · May be fixed by #3205
Assignees

Comments

@kelvin-ngure
Copy link
Contributor

kelvin-ngure commented Dec 19, 2023

Describe the feature request.
Following this pull request. We will migrate all the functionality of unencrypted shared preferences to datastore.

Additional context

Acceptance criteria
A check list of all things to verify once the implementation by the engineer is complete

Area path
A list of ordered steps in the app on usage of the feature to support anyone testing it e.g. Code reviewer, QA e.g.

  1. Login to the app
  2. Open Navigation bar
  3. Click on Children register
  4. Click on Child profile
  5. Click on Edit profile from menu

Implementation plan (For Engineers)
Create serializable wrapper data classes for relevant SDK classes
Replace shared preferences functionality
Update view models with StateFlow when needed
Write new tests
Remove unused tests
Update documentation

@kelvin-ngure kelvin-ngure self-assigned this Dec 19, 2023
@kelvin-ngure kelvin-ngure changed the title Migrate Shared preferences to datastore Migrate SharedPreferences to DataStore Dec 19, 2023
@kelvin-ngure kelvin-ngure linked a pull request Dec 20, 2023 that will close this issue
11 tasks
@kelvin-ngure
Copy link
Contributor Author

kelvin-ngure commented Feb 6, 2024

@f-odhiambo @ndegwamartin The most significant items left are

  • 1. Creating a Serializable wrapper for LocationHierarchies to allow storage
  • 2. No longer write the whole practitioner details object to preferences and check if the practitioner details store is empty instead when fetching token in the login view model. This is because the whole object is only used for that purpose
  • 3. There's a single read I need to port that seems to use REMOTE_SYNC_RESOURCES
  • 4. Updating tests that need proto datastore
  • 5. writing any new tests and docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants