hoppjan / luebeck-mensa-widget

Android Widget for the Menu of Mensa Lübeck
Apache License 2.0
7 stars 0 forks source link

Save the last Successfull API call #13

Closed lomenzel closed 1 year ago

lomenzel commented 1 year ago

If the user is offline or the HTTPS request fails for another reason, the api class will now return the last valid values it received.

lomenzel commented 1 year ago

this is my idea for #1 dont know if it works, because i dont know how to change the refresh intervall or manually do that. so its not tested

hoppjan commented 1 year ago

Since the widget will probably be reinstantiated on refresh, this probably needs to be wrote to disk.

To implement #1, it might be a good idea to fetch the API on a regular basis, write the results to disk, and use the disk info if exists in the widget.

lomenzel commented 1 year ago

unnessessary because of #20