Use string template instead of multiple append invocations.

This commit is contained in:
Benoit Marty
2026-05-27 09:54:27 +02:00
parent f6bdf51f6d
commit 6984ab0393
@@ -32,16 +32,11 @@ internal class MapTilerTileServerStyleUriBuilder(
return buildString {
if (customMapStyleUrl.isNullOrBlank()) {
val mapId = if (darkMode) darkMapId else lightMapId
append(baseUrl)
append("/")
append(mapId)
append("/")
append("style.json")
append("$baseUrl/$mapId/style.json")
} else {
append(customMapStyleUrl.removeSuffix("/"))
}
append("?key=")
append(apiKey)
append("?key=$apiKey")
}
}
}