aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-16 04:28:35 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-16 04:28:35 -0600
commitb5fc29667e85cc504e09cd9975590f6906d2ad8e (patch)
tree76cecbb3883bdad65dd05200abe898b86649f8b2 /androidApp/src
parentc2279f8ac8c606921c019e761044bd28ddf5e64c (diff)
downloadetbsa-trackermap-mobile-b5fc29667e85cc504e09cd9975590f6906d2ad8e.tar.gz
etbsa-trackermap-mobile-b5fc29667e85cc504e09cd9975590f6906d2ad8e.tar.bz2
etbsa-trackermap-mobile-b5fc29667e85cc504e09cd9975590f6906d2ad8e.zip
Fixed NullPointerException (probably)
Diffstat (limited to 'androidApp/src')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt12
1 files changed, 7 insertions, 5 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
index a8478fd..f577613 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
@@ -347,11 +347,13 @@ class MapFragment : GlobeMapFragment() {
}
fun updateTile(layer: MapLayer) {
- val tileInfo = RemoteTileInfoNew(layer.url, layer.minZoom, layer.maxZoom)
- this.tileInfo = tileInfoSetCacheDir(layer.url, tileInfo)
- this.tileInfo?.let {
- loader?.changeTileInfo(it)
- setZoomLimits(tileInfo.minZoom, tileInfo.maxZoom)
+ mapControl?.addPostSurfaceRunnable {
+ val tileInfo = RemoteTileInfoNew(layer.url, layer.minZoom, layer.maxZoom)
+ this.tileInfo = tileInfoSetCacheDir(layer.url, tileInfo)
+ this.tileInfo?.let {
+ loader?.changeTileInfo(it)
+ setZoomLimits(tileInfo.minZoom, tileInfo.maxZoom)
+ }
}
}