fix: call drawOverlays only when connected

pull/688/head
andrekir 2023-08-20 09:46:14 -03:00
rodzic 66ee722a91
commit 863acb6ce8
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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)
}
}