Only reload weather data for location if the location weather forecast isn't already previewed

This commit is contained in:
Nebojsa Vuksic 2025-08-07 10:40:27 +02:00
parent 015bd0426c
commit de0692bba6

View File

@ -92,7 +92,9 @@ class WeatherAppViewModel(
selectedLocationIndex.value = myLocations.value.lastIndex
}
onReloadWeatherForecast()
if (_weatherForecast.value.location != locationToAdd) {
onReloadWeatherForecast()
}
}
override fun onDeleteLocation(locationToDelete: Location) {