Refactorize weather widget implementation
Description
Simplify weather widget behavior because it was buggy.
Technical details
Simplify WeatherUpdateService and introduce 2 workers:
- OneTimeWeatherRequestWorker
- ForceWeatherRequestWorker
WeatherUpdateService schedules every 10 seconds a OneTimeWeatherRequestWorker that checks if a weather request is needed according to the period set in the widget settings. Default period has been adjusted to 15 minutes. This OneTimeWeatherRequestWorker fetches the latest know location of the device.
The widget update button triggers a ForceWeatherRequestWorker which forces a high accuracy location request.
Issues
https://gitlab.e.foundation/e/backlog/-/issues/5518
10 commandments of code reviews
Edited by Jonathan Klee