From 1aa01a475d95dff0d3d0964b4da4e9e348ac660b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 8 Jan 2024 21:48:28 +0100 Subject: [PATCH] weather: minor formatting changes in checkUpdate() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c09903b255e9d35c59c0bb9f335257d5b741f9fc Author: vanhofen Date: 2024-01-08 (Mon, 08 Jan 2024) Origin message was: ------------------ - weather: minor formatting changes in checkUpdate() ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/weather.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 327028da9..e70af69aa 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -82,10 +82,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()