mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Use string template instead of multiple append invocations.
This commit is contained in:
+2
-7
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user