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(
suspend fun getConfigData(): ConfigData? = withContext(dispatcherProvider.IO) {
Timber.tag(TAG).v("retrieveConfig()")
val configDownload = storage.getStoredConfig()
if (configDownload == null) {
val internalConfigData = storage.getStoredConfig()
if (internalConfigData == null) {
Timber.tag(TAG).d("No stored config available.")
return@withContext null
}
return@withContext try {
configDownload.let {
internalConfigData.let {
ConfigDataContainer(
mappedConfig = parser.parse(it.rawData),
serverTime = it.serverTime,
......
......@@ -16,9 +16,9 @@ class InteroperabilityRepository @Inject constructor(
) {
val countryList = appConfigProvider.currentConfig
.map {
.map { configData ->
try {
appConfigProvider.getAppConfig()
configData
.supportedCountries
.mapNotNull { rawCode ->
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