Skip to content

Commit

Permalink
Temporarily Disable Caching for MLS demo Hotfix (#2828)
Browse files Browse the repository at this point in the history
* Temporarily Disable Caching for MLS demo Hotfix

* Upgrade FHIR SDK engine ETag hot fix

* Reset configs cache on locale change

Signed-off-by: Elly Kitoto <[email protected]>

---------

Signed-off-by: Elly Kitoto <[email protected]>
Co-authored-by: Elly Kitoto <[email protected]>
  • Loading branch information
ndegwamartin and ellykits authored Oct 23, 2023
1 parent e74d613 commit 58c9030
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ constructor(
}
}

fun clearConfigsCache() = configCacheMap.clear()

companion object {
const val BASE_CONFIG_PATH = "configs/%s"
const val COMPOSITION_CONFIG_PATH = "configs/%s/composition_config.json"
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ desugar-jdk-libs = "1.1.5"
easy-rules-jexl = "4.1.0"
espresso-core = "3.5.1"
fhir-common-utils = "0.0.10-SNAPSHOT"
fhir-engine = "0.1.0-beta04-preview4-SNAPSHOT"
fhir-engine = "0.1.0-beta04-preview4.1-SNAPSHOT"
foundation = "1.3.1"
fragment-ktx = "1.6.1"
fragment-testing = "1.6.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ constructor(
is UserSettingsEvent.SwitchLanguage -> {
sharedPreferencesHelper.write(SharedPreferenceKey.LANG.name, event.language.tag)
event.context.run {
configurationRegistry.clearConfigsCache()
setAppLocale(event.language.tag)
getActivity()?.refresh()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ class UserSettingViewModelTest : RobolectricTest() {
Shadows.shadowOf(Looper.getMainLooper()).idle()

verify { sharedPreferencesHelper.write(SharedPreferenceKey.LANG.name, "es") }

Assert.assertTrue(configurationRegistry.configCacheMap.isEmpty())
}

@Test
Expand Down

0 comments on commit 58c9030

Please sign in to comment.