fix:3233: weeklyreport infinite loop on sunday
Description
Fix infinite loop of WeeklyReport generation during the last day of week. Fix also the weekly report not disappearing accurately at midnight after it start being displayed
Technical details
Tests
I managed to reproduce the bug, moving the phone date time to a few minutes before "end of week 11h00" --> for example Saturday at 10:57 in en_US locale ; or sunday at 10:57 in fr_FR locale.
- Then restart Advanced Privacy (using the settings -> apps -> AdvancedPrivacy screen for example)
- then waiting a few minutes to reach 11:00 .
tests cases
- Display WeeklyReport on Sunday at 11:00
- Dismiss WeeklyReport at the end of the day (without waiting)
Issues
- https://gitlab.e.foundation/e/os/backlog/-/issues/3233
- https://gitlab.e.foundation/e/os/backlog/-/issues/3240
- https://gitlab.e.foundation/e/os/backlog/-/issues/3241
10 commandments of code reviews
Edited by Guillaume Jacquart