preload gifs

This commit is contained in:
Matt Walsh
2020-09-23 11:49:15 -05:00
parent 36673b1f1d
commit 77c0744cb3
12 changed files with 39 additions and 14 deletions

View File

@@ -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;