Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Refactorize weather widget implementation

Jonathan Klee requested to merge 5518-rework-weather-widget into master

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

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/development/code-review

Edited by Jonathan Klee

Merge request reports

Loading