aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-17 23:31:25 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-17 23:31:25 -0600
commit7e942c16f07f3fa292d6be6461243231a74827c0 (patch)
treeb010aa4a8dd4646684b5ea804c6ca7189dd6860d
parente4609ba08a21aadf5d38aecafc29810f8e1e14ee (diff)
downloadetbsa-trackermap-mobile-7e942c16f07f3fa292d6be6461243231a74827c0.tar.gz
etbsa-trackermap-mobile-7e942c16f07f3fa292d6be6461243231a74827c0.tar.bz2
etbsa-trackermap-mobile-7e942c16f07f3fa292d6be6461243231a74827c0.zip
Fixed attribution not being formatted with HtmlCompat
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt10
1 files changed, 8 insertions, 2 deletions
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)