From cb5ef827d006bdd6fa23f68d7c5e7c9f27d8ffbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Mon, 13 Jan 2025 08:24:50 +0100 Subject: [PATCH] fix: always use day icons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The API response did not contain an is_day flag for the summary. Therefore the code always opted for using the night icon. Doesn't make sense. Signed-off-by: André Jaenisch --- weather-api-widget/weather.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/weather-api-widget/weather.lua b/weather-api-widget/weather.lua index 6bc720c..4841cac 100644 --- a/weather-api-widget/weather.lua +++ b/weather-api-widget/weather.lua @@ -321,10 +321,6 @@ local function worker(user_args) for i, day in ipairs(forecast) do -- Free plan allows forecast for up to three days, each with hours if i > 3 then break end - local day_night_extension = "" - if not day.is_day then - day_night_extension = "-night" - end local day_forecast = wibox.widget { { @@ -336,9 +332,9 @@ local function worker(user_args) { { { + -- No extension to decide between day and night image = ICONS_DIR .. icon_map[day.day.condition.code] - .. day_night_extension .. icons_extension, resize = true, forced_width = 48,