|
|
@ -105,7 +105,8 @@ function parseWeatherCurrent() { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.currentWeatherCache == "in refresh") |
|
|
|
if ((this.forecastWeatherCache == "in refresh") || |
|
|
|
|
|
|
|
(this.currentWeatherCache == "in refresh")) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
this.checkPositionInPanel(); |
|
|
|
this.checkPositionInPanel(); |
|
|
@ -209,6 +210,10 @@ function refreshWeatherCurrent() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function parseWeatherForecast() { |
|
|
|
function parseWeatherForecast() { |
|
|
|
|
|
|
|
if ((this.forecastWeatherCache == "in refresh") || |
|
|
|
|
|
|
|
(this.currentWeatherCache == "in refresh")) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
if (this.forecastWeatherCache === undefined) { |
|
|
|
if (this.forecastWeatherCache === undefined) { |
|
|
|
// this is a reentrency guard, in this times set for both caches,
|
|
|
|
// this is a reentrency guard, in this times set for both caches,
|
|
|
|
// because they get updated with one call to forecast.io
|
|
|
|
// because they get updated with one call to forecast.io
|
|
|
@ -222,9 +227,6 @@ function parseWeatherForecast() { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.forecastWeatherCache == "in refresh") |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let forecast = this.forecastWeatherCache; |
|
|
|
let forecast = this.forecastWeatherCache; |
|
|
|
let beginOfDay = new Date(new Date().setHours(0, 0, 0, 0)); |
|
|
|
let beginOfDay = new Date(new Date().setHours(0, 0, 0, 0)); |
|
|
|
let cnt = Math.min(this._days_forecast, forecast.length); |
|
|
|
let cnt = Math.min(this._days_forecast, forecast.length); |
|
|
|