From 6984ab03933a8c294d2255a3e9637f20211c705b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 May 2026 09:54:27 +0200 Subject: [PATCH] Use string template instead of multiple append invocations. --- .../api/internal/MapTilerTileServerStyleUriBuilder.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt index 761adb25cf..b580ea4824 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt @@ -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") } } }