-
Notifications
You must be signed in to change notification settings - Fork 56
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 #2934
Commits on Dec 20, 2023
-
Migrate functionality on the ConfigRegistry and update tests
- Update methods to handle flows - Initialize flows in the datastore to prevent duplication and have single source of truth
Configuration menu - View commit details
-
Copy full SHA for 0200cb1 - Browse repository at this point
Copy the full SHA 0200cb1View commit details
Commits on Dec 21, 2023
-
- Add new keys - Migrate WritePractitionerDetails
Configuration menu - View commit details
-
Copy full SHA for 4c84ee1 - Browse repository at this point
Copy the full SHA 4c84ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92f07cf - Browse repository at this point
Copy the full SHA 92f07cfView commit details
Commits on Dec 22, 2023
-
- Temporarily store Objects in preferences datastore to allow full re…
…moval of sharedpreferences - Update quest/ConfigurationRegistry, LoginViewModel, and AppSetting View model to utilize preferences datastore and ditch sharedpreferences - Refactor key names and variables in writePractitionerDetailsToShredPref() for readability - Refactor test assertion that cmpared ResourceType enum values to strings - Update Rules Factory with preferences datastore - Update all associated tests
Configuration menu - View commit details
-
Copy full SHA for b9a6a85 - Browse repository at this point
Copy the full SHA b9a6a85View commit details -
- Rename PreferenceDataStoreTest file name and add gso dependency to …
…test - Update RulesFactory enum names and flows
Configuration menu - View commit details
-
Copy full SHA for da425ad - Browse repository at this point
Copy the full SHA da425adView commit details -
Configuration menu - View commit details
-
Copy full SHA for e5d0d4c - Browse repository at this point
Copy the full SHA e5d0d4cView commit details
Commits on Jan 2, 2024
-
Update PreferencesDataStore structure and propagate changes and tests
- Update Preferences DataStore read and write to have separate Generics for Key and return type. Useful e.g for LOCATION_IDS key is String, return type is List<String> - Change the flow returning read()s to observe() and create a blocking read() function - Update RulesFactory and RulesFactoryTest functions. Remove verify{} since no functions called. Flow values still validatable via every{}. read() to be tested on datastore tests - Replace sharedpreferences usage in ConfigService - Replace sharedpreferences usage in network module - Replace usage in RegisterRepository and add tests - Update tests for changed classes
Configuration menu - View commit details
-
Copy full SHA for 4ad1638 - Browse repository at this point
Copy the full SHA 4ad1638View commit details
Commits on Jan 3, 2024
-
Update view models, activities, and corresponding tests
Add a default value argument to datastore read() to allow setting default value e.g Locale.ENGLISH for language - Update AppSettingViewModel to datastore
Configuration menu - View commit details
-
Copy full SHA for 28240cc - Browse repository at this point
Copy the full SHA 28240ccView commit details
Commits on Jan 4, 2024
-
Update view models and Tests with blocking read
- Replace observe()
Configuration menu - View commit details
-
Copy full SHA for 4df6871 - Browse repository at this point
Copy the full SHA 4df6871View commit details -
Extract remoteSyncResources from Flow
- WIP to be replaced with readOnce()
Configuration menu - View commit details
-
Copy full SHA for 2b42eb3 - Browse repository at this point
Copy the full SHA 2b42eb3View commit details
Commits on Jan 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 388944e - Browse repository at this point
Copy the full SHA 388944eView commit details
Commits on Jan 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8378981 - Browse repository at this point
Copy the full SHA 8378981View commit details -
Configuration menu - View commit details
-
Copy full SHA for ed9daf5 - Browse repository at this point
Copy the full SHA ed9daf5View commit details
Commits on Jan 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 07ed6cc - Browse repository at this point
Copy the full SHA 07ed6ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa2fe58 - Browse repository at this point
Copy the full SHA fa2fe58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88c6d24 - Browse repository at this point
Copy the full SHA 88c6d24View commit details
Commits on Jan 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 33cc1a7 - Browse repository at this point
Copy the full SHA 33cc1a7View commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/engine/build.gradle.kts # android/engine/src/main/java/org/smartregister/fhircore/engine/datastore/PreferenceDataStore.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/configuration/ConfigurationRegistryTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/data/local/register/RegisterRepositoryTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/sync/SyncBroadcasterTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/task/FhirCompleteCarePlanWorkerTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/task/FhirResourceExpireWorkerTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/task/FhirTaskStatusUpdateWorkerTest.kt # android/quest/src/androidTest/java/org/smartregister/fhircore/quest/integration/Faker.kt # android/quest/src/androidTest/java/org/smartregister/fhircore/quest/integration/ui/report/measure/components/MeasureReportResultScreenTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/CqlContentTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/app/ConfigurationRegistryTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/appsetting/AppSettingViewModelTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/login/LoginViewModelTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/pin/PinViewModelTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireViewModelTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/register/RegisterFragmentTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/register/RegisterViewModelTest.kt
Configuration menu - View commit details
-
Copy full SHA for eb04272 - Browse repository at this point
Copy the full SHA eb04272View commit details -
Configuration menu - View commit details
-
Copy full SHA for b19c0cd - Browse repository at this point
Copy the full SHA b19c0cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for db1921d - Browse repository at this point
Copy the full SHA db1921dView commit details
Commits on Jan 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1d6f72d - Browse repository at this point
Copy the full SHA 1d6f72dView commit details
Commits on Jan 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for afe5090 - Browse repository at this point
Copy the full SHA afe5090View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5ac6a8 - Browse repository at this point
Copy the full SHA e5ac6a8View commit details
Commits on Jan 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8d9329b - Browse repository at this point
Copy the full SHA 8d9329bView commit details -
- Add Fake Preferences datastore for dispatcher injection - Reinstate ResourceType Bound preference keys
Configuration menu - View commit details
-
Copy full SHA for b6b523d - Browse repository at this point
Copy the full SHA b6b523dView commit details
Commits on Jan 19, 2024
-
Fix BaseMultilanguage injection issue while maintaining hilt modules
Co-authored-by: Lazarus <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4cd181 - Browse repository at this point
Copy the full SHA d4cd181View commit details
Commits on Jan 20, 2024
-
Create Activities after Injection
Use module to inject fake datastore: fails with module, passes with instantiation because incorrect dispatcher is passed. Next commit will try to use Faker.buildPreferencesDataSTore instead
Configuration menu - View commit details
-
Copy full SHA for 5640ae6 - Browse repository at this point
Copy the full SHA 5640ae6View commit details -
Use Faker for making test datastore
- Add needed mockk changes in UserSettingViewModel class
Configuration menu - View commit details
-
Copy full SHA for 83730a5 - Browse repository at this point
Copy the full SHA 83730a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for e08c140 - Browse repository at this point
Copy the full SHA e08c140View commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/engine/src/main/java/org/smartregister/fhircore/engine/datastore/PreferenceDataStore.kt # android/engine/src/main/java/org/smartregister/fhircore/engine/datastore/mockdata/UserInfo.kt # android/engine/src/main/java/org/smartregister/fhircore/engine/rulesengine/RulesFactory.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/data/DataMigration.kt
Configuration menu - View commit details
-
Copy full SHA for 5a83ba8 - Browse repository at this point
Copy the full SHA 5a83ba8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c1a3ad - Browse repository at this point
Copy the full SHA 9c1a3adView commit details
Commits on Jan 22, 2024
-
- Replace empty string with null for PRACTITIONER_ID default value
Configuration menu - View commit details
-
Copy full SHA for 5b35e1b - Browse repository at this point
Copy the full SHA 5b35e1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89082fd - Browse repository at this point
Copy the full SHA 89082fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae3b41b - Browse repository at this point
Copy the full SHA ae3b41bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f32001e - Browse repository at this point
Copy the full SHA f32001eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 28333f2 - Browse repository at this point
Copy the full SHA 28333f2View commit details
Commits on Jan 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8eb0ce8 - Browse repository at this point
Copy the full SHA 8eb0ce8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 421b299 - Browse repository at this point
Copy the full SHA 421b299View commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # docs/engineering/android-app/developer-setup/publishing-fhir-sdk-artifacts.mdx
Configuration menu - View commit details
-
Copy full SHA for fbe1acf - Browse repository at this point
Copy the full SHA fbe1acfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4348d3f - Browse repository at this point
Copy the full SHA 4348d3fView commit details
Commits on Jan 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b82d5b5 - Browse repository at this point
Copy the full SHA b82d5b5View commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/quest/src/main/java/org/smartregister/fhircore/quest/data/DataMigration.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingViewModel.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/data/DataMigrationTest.kt
Configuration menu - View commit details
-
Copy full SHA for e479679 - Browse repository at this point
Copy the full SHA e479679View commit details -
Configuration menu - View commit details
-
Copy full SHA for d45a47c - Browse repository at this point
Copy the full SHA d45a47cView commit details
Commits on Jan 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fe89e12 - Browse repository at this point
Copy the full SHA fe89e12View commit details -
Add binding i failing AppMainActivity test to replace datastore
- Add UninstallModules due to duplicate bindings error
Configuration menu - View commit details
-
Copy full SHA for ee9b3f5 - Browse repository at this point
Copy the full SHA ee9b3f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 323834e - Browse repository at this point
Copy the full SHA 323834eView commit details -
Configuration menu - View commit details
-
Copy full SHA for db79364 - Browse repository at this point
Copy the full SHA db79364View commit details
Commits on Jan 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ccbccb5 - Browse repository at this point
Copy the full SHA ccbccb5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b6b6573 - Browse repository at this point
Copy the full SHA b6b6573View commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/engine/src/test/java/org/smartregister/fhircore/engine/data/local/DefaultRepositoryTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/data/local/register/RegisterRepositoryTest.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/task/FhirResourceExpireWorkerTest.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/main/AppMainViewModel.kt
Configuration menu - View commit details
-
Copy full SHA for 82b3165 - Browse repository at this point
Copy the full SHA 82b3165View commit details -
Configuration menu - View commit details
-
Copy full SHA for 873ba78 - Browse repository at this point
Copy the full SHA 873ba78View commit details
Commits on Jan 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 426d60c - Browse repository at this point
Copy the full SHA 426d60cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b9f7f4f - Browse repository at this point
Copy the full SHA b9f7f4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3e393a - Browse repository at this point
Copy the full SHA a3e393aView commit details
Commits on Jan 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b1e6b68 - Browse repository at this point
Copy the full SHA b1e6b68View commit details -
Refactor: Add remote sync resources back to preferences datastore fro…
…m practitioner Datastore and use comma delimiter
Configuration menu - View commit details
-
Copy full SHA for f20dfd8 - Browse repository at this point
Copy the full SHA f20dfd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81fce8c - Browse repository at this point
Copy the full SHA 81fce8cView commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/ConfigurationRegistry.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/configuration/ConfigurationRegistryTest.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/appsetting/AppSettingViewModel.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/register/RegisterViewModel.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/app/ConfigurationRegistryTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/appsetting/AppSettingViewModelTest.kt
Configuration menu - View commit details
-
Copy full SHA for c3d2dcc - Browse repository at this point
Copy the full SHA c3d2dccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12a565e - Browse repository at this point
Copy the full SHA 12a565eView commit details
Commits on Feb 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for fb16f79 - Browse repository at this point
Copy the full SHA fb16f79View commit details
Commits on Feb 8, 2024
-
- Serializable wrapper for Location Hierarchies - Remore PractitionerDetails write and use datasore state to check for authentication - Refactor user insights screen usage of lists stored in datastore
Configuration menu - View commit details
-
Copy full SHA for 3eb1f1f - Browse repository at this point
Copy the full SHA 3eb1f1fView commit details
Commits on Feb 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 37a00fa - Browse repository at this point
Copy the full SHA 37a00faView commit details -
Merge branch 'main' into 2930-migrate-sharedpreferences-to-datastore
# Conflicts: # android/engine/src/main/java/org/smartregister/fhircore/engine/di/NetworkModule.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/app/fakes/Faker.kt # android/engine/src/test/java/org/smartregister/fhircore/engine/configuration/ConfigurationRegistryTest.kt # android/quest/src/androidTest/java/org/smartregister/fhircore/quest/integration/Faker.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/data/DataMigration.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/main/AppMainViewModel.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/register/RegisterFragment.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/register/RegisterViewModel.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/CqlContentTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/app/fakes/Faker.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/main/AppMainActivityTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/questionnaire/QuestionnaireViewModelTest.kt # android/quest/src/test/java/org/smartregister/fhircore/quest/ui/report/measure/MeasureReportViewModelTest.kt
Configuration menu - View commit details
-
Copy full SHA for 3445754 - Browse repository at this point
Copy the full SHA 3445754View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0efa227 - Browse repository at this point
Copy the full SHA 0efa227View commit details
Commits on Feb 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a2db345 - Browse repository at this point
Copy the full SHA a2db345View commit details
Commits on Feb 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7a41cef - Browse repository at this point
Copy the full SHA 7a41cefView commit details
Commits on Feb 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 43e0834 - Browse repository at this point
Copy the full SHA 43e0834View commit details -
Merge branch '2930-migrate-sharedpreferences-to-datastore' of github.…
…com:opensrp/fhircore into 2930-migrate-sharedpreferences-to-datastore
Configuration menu - View commit details
-
Copy full SHA for b5ac626 - Browse repository at this point
Copy the full SHA b5ac626View commit details