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,8 +92,10 @@ class WeatherAppViewModel(
selectedLocationIndex.value = myLocations.value.lastIndex
}
if (_weatherForecast.value.location != locationToAdd) {
onReloadWeatherForecast()
}
}
override fun onDeleteLocation(locationToDelete: Location) {
myLocations.value -= locationToDelete