weather-widget icon indicating copy to clipboard operation
weather-widget copied to clipboard

Cache last valid response and add 'last updated at' info

Open YayC opened this issue 8 years ago • 3 comments

Great widget! I've just been having an issue where the "Could not retrieve weather data" error is popping up quite frequently, which wipes out the whole forecast from the view. You can see how it looks if you turn off your internet connection when the widget tries to refresh.

When there is an error fetching new data, it would be awesome if it would keep data from the last valid response since that (slightly outdated) info is still very useful. A complementary feature would be to display a "last updated at" field so the user would know how fresh the info is.

YayC avatar Apr 04 '16 22:04 YayC

good suggestion!

felixhageloh avatar Apr 06 '16 06:04 felixhageloh

Thumbs up for this! Excellent widget, but requires live connection to Internet all the time...

wezzer avatar Jun 12 '16 20:06 wezzer

I have put in a pull request that should resolve this issue. It adds caching and some retry logic. You can review it/test it out here. https://github.com/felixhageloh/weather-widget/pull/37

kyletitus avatar Jan 31 '17 14:01 kyletitus