in src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/WeatherAppViewModel.kt [253:261]
override fun onAddLocation(locationToAdd: Location) {
val newState = _myLocationsUIStateFlow.value.withLocationAdded(locationToAdd)
updateLocationsUIStateWith(newState)
if (_weatherState.value.getLocationOrNull() != locationToAdd) {
onReloadWeatherForecast()
}
}