fix extended forecast preload close #189

This commit is contained in:
Matt Walsh
2026-03-16 12:31:27 -05:00
parent 77592a08a3
commit 678f04fe42
3 changed files with 18 additions and 3 deletions

View File

@@ -138,15 +138,14 @@ const parse = (fullForecast, forecastUrl) => {
// get the object to modify/populate
const fDay = forecast[destIndex];
// preload the icon
preloadImg(fDay.icon);
if (period.isDaytime) {
// day time is the high temperature
fDay.high = period.temperature;
fDay.icon = getLargeIcon(period.icon);
fDay.text = shortenExtendedForecastText(period.shortForecast);
fDay.dayName = dates[destIndex];
// preload the icon
preloadImg(fDay.icon);
// Wait for the corresponding night period to increment
} else {
// low temperature