From 4dd2d83d3a4a138a256d09cded00368bbeb78e39 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 ------------------ 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 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()