From a33e0d509e3b716d8995f56459c92957702f83a6 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Mon, 17 Jan 2022 23:31:25 -0600 Subject: Fixed attribution not being formatted with HtmlCompat --- .../mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'androidApp/src/main/java/mx') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt index 4ff4c16..01587ae 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt @@ -99,7 +99,10 @@ class MapWrapperFragment: Fragment() { if (mapFragment.hasStarted) { Utils.showLayersPopUp(context, it) { type -> mapFragment.updateLayer(type) - binding.attributionText.text = MapLayer.layers[type]?.attribution + MapLayer.layers[type]?.attribution?.let { attribution -> + binding.attributionText.text = + HtmlCompat.fromHtml(attribution, 0) + } } } else { binding.mapLayerToggle.performClick() @@ -201,7 +204,10 @@ class MapWrapperFragment: Fragment() { fun updateLayer(layer: MapLayer.Type) { if (mapFragment.hasStarted) { mapFragment.updateLayer(layer) - binding.attributionText.text = MapLayer.layers[layer]?.attribution + MapLayer.layers[layer]?.attribution?.let { attribution -> + binding.attributionText.text = + HtmlCompat.fromHtml(attribution, 0) + } } else { mapFragment.setupCallbacks.add { updateLayer(layer) -- cgit v1.2.3