From e9f75b11920e0975c21867f190576c205ab71184 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Sat, 24 Sep 2016 21:35:14 +0200 Subject: [PATCH] Do not invalidate shown weather data of openweathermap.org, if we do not get a valid response from the server. Hopefully fixes #147. --- src/openweathermap_org.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/openweathermap_org.js b/src/openweathermap_org.js index c252100..8c04648 100644 --- a/src/openweathermap_org.js +++ b/src/openweathermap_org.js @@ -403,9 +403,8 @@ function refreshWeatherCurrent() { this.parseWeatherCurrent(); } else { - // we are connected, but get no (or no correct) data, so invalidate - // the shown data and reload after 10 minutes (recommendded by openweathermap.org) - this.rebuildCurrentWeatherUi(); + // we are connected, but get no (or no correct) data, so try to reload + // after 10 minutes (recommendded by openweathermap.org) this.reloadWeatherCurrent(600); } }); @@ -486,9 +485,8 @@ function refreshWeatherForecast() { this.parseWeatherForecast(); } else { - // we are connected, but get no (or no correct) data, so invalidate - // the shown data and reload after 10 minutes (recommendded by openweathermap.org) - this.rebuildFutureWeatherUi(); + // we are connected, but get no (or no correct) data, so try to reload + // after 10 minutes (recommendded by openweathermap.org) this.reloadWeatherForecast(600); } });