fix: share weather cadence across renderers

This commit is contained in:
OpenAI Codex
2026-09-07 15:16:11 +08:00
parent 8d12a4b361
commit ab86eb8f67
9 changed files with 124 additions and 57 deletions

View File

@@ -256,6 +256,8 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
private fun leaveRealWeatherMode() {
dismissRealWeatherTuning()
weatherRuntime?.dispose()
weatherRuntime = null
if (realWeatherMode) {
preRealWeatherVisuals?.let { visuals ->
particleCount = visuals.count; lineWidth = visuals.width; particleLength = visuals.length
@@ -438,6 +440,8 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
}
private fun loadValidationStyle(active: Boolean, enabled: Boolean, reason: String = "STYLE_CHANGE") {
weatherRuntime?.dispose()
weatherRuntime = null
this.active = active
this.enabled = enabled
val state = statusText()
@@ -806,7 +810,7 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
override fun onResume() { super.onResume(); mapView.onResume() }
override fun onPause() { mapView.onPause(); super.onPause() }
override fun onStop() { mapView.onStop(); super.onStop() }
override fun onDestroy() { mapView.onDestroy(); super.onDestroy() }
override fun onDestroy() { weatherRuntime?.dispose(); weatherRuntime = null; mapView.onDestroy(); super.onDestroy() }
override fun onLowMemory() { super.onLowMemory(); mapView.onLowMemory() }
override fun onSaveInstanceState(outState: Bundle) {