mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-23 12:09:30 -07:00
fix nighttime icons on extended forecast close #134
This commit is contained in:
@@ -137,10 +137,6 @@ const parse = (fullForecast, forecastUrl) => {
|
|||||||
}
|
}
|
||||||
// get the object to modify/populate
|
// get the object to modify/populate
|
||||||
const fDay = forecast[destIndex];
|
const fDay = forecast[destIndex];
|
||||||
// high temperature will always be last in the source array so it will overwrite the low values assigned below
|
|
||||||
fDay.icon = getLargeIcon(period.icon);
|
|
||||||
fDay.text = shortenExtendedForecastText(period.shortForecast);
|
|
||||||
fDay.dayName = dates[destIndex];
|
|
||||||
|
|
||||||
// preload the icon
|
// preload the icon
|
||||||
preloadImg(fDay.icon);
|
preloadImg(fDay.icon);
|
||||||
@@ -148,6 +144,9 @@ const parse = (fullForecast, forecastUrl) => {
|
|||||||
if (period.isDaytime) {
|
if (period.isDaytime) {
|
||||||
// day time is the high temperature
|
// day time is the high temperature
|
||||||
fDay.high = period.temperature;
|
fDay.high = period.temperature;
|
||||||
|
fDay.icon = getLargeIcon(period.icon);
|
||||||
|
fDay.text = shortenExtendedForecastText(period.shortForecast);
|
||||||
|
fDay.dayName = dates[destIndex];
|
||||||
// Wait for the corresponding night period to increment
|
// Wait for the corresponding night period to increment
|
||||||
} else {
|
} else {
|
||||||
// low temperature
|
// low temperature
|
||||||
|
|||||||
Reference in New Issue
Block a user