Skip to content
Snippets Groups Projects
Unverified Commit 188244c8 authored by Chilja Gossow's avatar Chilja Gossow Committed by GitHub
Browse files

Display country list from config (EXPOSUREAPP-4278) #1879

parent b089c783
No related branches found
No related tags found
No related merge requests found
...@@ -19,14 +19,14 @@ class LocalAppConfigSource @Inject constructor( ...@@ -19,14 +19,14 @@ class LocalAppConfigSource @Inject constructor(
suspend fun getConfigData(): ConfigData? = withContext(dispatcherProvider.IO) { suspend fun getConfigData(): ConfigData? = withContext(dispatcherProvider.IO) {
Timber.tag(TAG).v("retrieveConfig()") Timber.tag(TAG).v("retrieveConfig()")
val configDownload = storage.getStoredConfig() val internalConfigData = storage.getStoredConfig()
if (configDownload == null) { if (internalConfigData == null) {
Timber.tag(TAG).d("No stored config available.") Timber.tag(TAG).d("No stored config available.")
return@withContext null return@withContext null
} }
return@withContext try { return@withContext try {
configDownload.let { internalConfigData.let {
ConfigDataContainer( ConfigDataContainer(
mappedConfig = parser.parse(it.rawData), mappedConfig = parser.parse(it.rawData),
serverTime = it.serverTime, serverTime = it.serverTime,
......
...@@ -16,9 +16,9 @@ class InteroperabilityRepository @Inject constructor( ...@@ -16,9 +16,9 @@ class InteroperabilityRepository @Inject constructor(
) { ) {
val countryList = appConfigProvider.currentConfig val countryList = appConfigProvider.currentConfig
.map { .map { configData ->
try { try {
appConfigProvider.getAppConfig() configData
.supportedCountries .supportedCountries
.mapNotNull { rawCode -> .mapNotNull { rawCode ->
val countryCode = rawCode.toLowerCase(Locale.ROOT) val countryCode = rawCode.toLowerCase(Locale.ROOT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment