Do not invalidate shown weather data of openweathermap.org, if we do not get a valid response from the server.

Hopefully fixes #147.
merge-requests/218/head
Jens Lody 8 years ago
parent f568f62b84
commit e9f75b1192
  1. 10
      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);
}
});

Loading…
Cancel
Save