fix: call drawOverlays only when connected

This commit is contained in:
andrekir 2023-08-20 09:46:14 -03:00
parent 66ee722a91
commit 863acb6ce8

View file

@ -447,7 +447,7 @@ fun MapView(model: UIViewModel = viewModel()) {
// FIXME workaround to 'nodes.observeAsState' going stale after MapFragment enters onPause state
LaunchedEffect(Unit) {
while (true) {
if (downloadRegionBoundingBox == null) map.drawOverlays()
if (model.isConnected() && downloadRegionBoundingBox == null) map.drawOverlays()
delay(30000L)
}
}