From 9d196f645bc340742747a7425f7cd314aac7188a Mon Sep 17 00:00:00 2001 From: Johan von Forstner Date: Sat, 14 Sep 2024 12:41:28 +0200 Subject: [PATCH] OCM: fix blank cost field fixes #358 --- .../net/vonforst/evmap/api/openchargemap/OpenChargeMapModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/vonforst/evmap/api/openchargemap/OpenChargeMapModel.kt b/app/src/main/java/net/vonforst/evmap/api/openchargemap/OpenChargeMapModel.kt index 983ca73c6..4657c31b2 100644 --- a/app/src/main/java/net/vonforst/evmap/api/openchargemap/OpenChargeMapModel.kt +++ b/app/src/main/java/net/vonforst/evmap/api/openchargemap/OpenChargeMapModel.kt @@ -76,7 +76,7 @@ data class OCMChargepoint( mediaItems?.mapNotNull { it.convert() }, null, null, - cost?.let { Cost(descriptionShort = it) }, + cost?.takeIf { it.isNotBlank() }.let { Cost(descriptionShort = it) }, dataProvider?.let { "© ${it.title}" + if (it.license != null) ". ${it.license}" else "" }, ChargepriceData( addressInfo.countryISOCode(refData),