diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index ae8a8a3b0..ce2b33c29 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -81,10 +81,11 @@ void CWeather::setCoords(std::string new_coords, std::string new_city) bool CWeather::checkUpdate(bool forceUpdate) { time_t current_time = time(NULL); + if (forceUpdate || (difftime(current_time, last_time) > (UPDATE_CYCLE * 60))) return GetWeatherDetails(); - else - return false; + + return false; } bool CWeather::GetWeatherDetails()