aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
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
commita33e0d509e3b716d8995f56459c92957702f83a6 (patch)
treeb010aa4a8dd4646684b5ea804c6ca7189dd6860d /androidApp/src/main/java
parent58993740a5c7bea745969e2de3641499ab79d9c8 (diff)
downloadetbsa-trackermap-mobile-a33e0d509e3b716d8995f56459c92957702f83a6.tar.gz
etbsa-trackermap-mobile-a33e0d509e3b716d8995f56459c92957702f83a6.tar.bz2
etbsa-trackermap-mobile-a33e0d509e3b716d8995f56459c92957702f83a6.zip
Fixed attribution not being formatted with HtmlCompat
Diffstat (limited to 'androidApp/src/main/java')
-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)