vbguyny / ws4kp

WeatherStar 4000+
https://battaglia.ddns.net/twc
MIT License
427 stars 117 forks source link

Remove geoquery when working from a saved location close #85 #86

Closed netbymatt closed 1 year ago

netbymatt commented 1 year ago

I was able to remove 2 of the 3 geoquery api calls when using the last location stored in 1localStorage1. This is accomplished by adding a new item to localStorage: 'TwcLatLon'.

The third one is a call to the reverse geocode to get the zip code. It could be stored and re-used as well, but it wasn't something that I had tackled in my fork so I didn't try to remove it yet.

The spanLastRefresh had to be moved to it's new location to resolve a race condition exposed by not needing to wait for the two round trips to the geocode server. The _AutoSelectQuery variable and code was also removed as it is no longer needed.

netbymatt commented 1 year ago

Yes it did! I didn't realize that feature had been added. It is working again.