Fix weather sdk providing wrong WeatherLocation (#1071)

This commit is contained in:
leekleak 2024-09-05 16:16:46 +00:00 committed by GitHub
parent 5cf6c1c6e3
commit cfda952b2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,7 +132,7 @@ abstract class WeatherProvider(
return getWeatherData(lat, lon, lang)
}
if (id != null && locationName != null) {
return getWeatherData(WeatherLocation.Id(id, locationName), lang)
return getWeatherData(WeatherLocation.Id(locationName, id), lang)
}
if (locationName != null && lat != null && lon != null) {
return getWeatherData(WeatherLocation.LatLon(locationName, lat, lon), lang)