mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-21 19:19:31 -07:00
use locally stored weather parameters in spc outlook close #150
This commit is contained in:
@@ -57,6 +57,7 @@ class SpcOutlook extends WeatherDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getData(weatherParameters, refresh) {
|
async getData(weatherParameters, refresh) {
|
||||||
|
if (weatherParameters) this.weatherParameters = weatherParameters;
|
||||||
if (!super.getData(weatherParameters, refresh)) return;
|
if (!super.getData(weatherParameters, refresh)) return;
|
||||||
|
|
||||||
// SPC outlook data does not need to be reloaded on a location change, only during silent refresh
|
// SPC outlook data does not need to be reloaded on a location change, only during silent refresh
|
||||||
@@ -93,7 +94,7 @@ class SpcOutlook extends WeatherDisplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// parse the data
|
// parse the data
|
||||||
this.data = testAllPoints([weatherParameters.longitude, weatherParameters.latitude], this.rawOutlookData);
|
this.data = testAllPoints([this.weatherParameters.longitude, this.weatherParameters.latitude], this.rawOutlookData);
|
||||||
|
|
||||||
// check if there's a "risk" for any of the three days, otherwise skip the SPC Outlook screen
|
// check if there's a "risk" for any of the three days, otherwise skip the SPC Outlook screen
|
||||||
if (this.data.reduce((prev, cur) => prev || !!cur, false)) {
|
if (this.data.reduce((prev, cur) => prev || !!cur, false)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user