preload gifs
This commit is contained in:
parent
36673b1f1d
commit
77c0744cb3
12 changed files with 39 additions and 14 deletions
|
|
@ -34,7 +34,7 @@ class ExtendedForecast extends WeatherDisplay {
|
|||
});
|
||||
} catch (e) {
|
||||
console.error('Unable to get extended forecast');
|
||||
console.error(e);
|
||||
console.error(e.status, e.responseJSON);
|
||||
this.setStatus(STATUS.failed);
|
||||
return;
|
||||
}
|
||||
|
|
@ -67,6 +67,9 @@ class ExtendedForecast extends WeatherDisplay {
|
|||
fDay.text = this.shortenExtendedForecastText(period.shortForecast);
|
||||
fDay.dayName = dates[destIndex];
|
||||
|
||||
// preload the icon
|
||||
utils.image.preload(fDay.icon);
|
||||
|
||||
if (period.isDaytime) {
|
||||
// day time is the high temperature
|
||||
fDay.high = period.temperature;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue