Modern Apps git

← Modern-Apps.git

library: name the attach-replay captures instead of shadowing (#maprender)

Commit
0fa011fb34a9522718da4c1c3a2fa73d4bd2e56a
Author
Vayun Mathur <[email protected]>
When
2026-11-13 20:41 UTC (22 days ago)
Parents
24b72bc
Follow-up to the render-thread move: replayDeferredState captured the
online flag and layer options into locals named like the properties
they shadow. Renamed (onlineNow/options) and the kind list is joined on
the main thread like setLayers does, so the render-thread task only
makes the JNI calls. No behaviour change.

Diff

library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt
diff --git a/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt b/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.ktindex 73a3837c57..74bd94ddef 100644--- a/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt+++ b/library/map/src/main/java/com/vayunmathur/library/map/SurfaceMapRenderer.kt@@ -422,13 +422,14 @@ class SurfaceMapRenderer(     }      private fun replayDeferredState() {-        val online = online-        val layers = layers+        val onlineNow = online+        val options = layers+        val kinds = options.poiKinds.joinToString(",")         onRenderThread { h ->-            MapNative.setOnline(h, online)-            MapNative.setLayers(h, layers.poi, layers.transit, layers.poiKinds.joinToString(","))-            MapNative.setTrafficEnabled(h, layers.traffic)-            MapNative.setSafetyEnabled(h, layers.safety)+            MapNative.setOnline(h, onlineNow)+            MapNative.setLayers(h, options.poi, options.transit, kinds)+            MapNative.setTrafficEnabled(h, options.traffic)+            MapNative.setSafetyEnabled(h, options.safety)         }         applyUserPuck()         applyRoute()