Set library update time
Currently the method for scheduling library updates at a given time is tedious to set up as it just uses the time the first update was scheduled. It also uses PeriodicWorkRequests which aren't very precise as they will update within a window resulting in the update time steadily drifting from what it was originally set from.
This PR adds a new setting in the library settings menu to set the time the library update will be triggered. It calculates the delay in minutes until the specified update time and then enqueues a LibraryUpdateJob OneTimeWorkRequest to run after that many minutes. After each LibraryUpdateJob a new OneTimeWorkRequest is enqueued for the user specified time.
These changes have been tested on every update delay interval, and the UI changes have been tested with all base themes and tablet mode
Images
| Menu option | Time picker | Tablet mode |
|---|---|---|
What does that look like in 24 hour format? I refuse to use 12 hour format for anything like this.
Should probably include a disclaimer about workers being inaccurate / drifting over time. Or at the very least an "approximately" Once you add a clock people will have even more reason to expect alarm-like precision down to the minute.
@MajorTanya It now adapts to whatever time format your device is using
Images
| Menu option | Time picker |
|---|---|
Should probably include a disclaimer about workers being inaccurate / drifting over time. Or at the very least an "approximately" Once you add a clock people will have even more reason to expect alarm-like precision down to the minute.
@BrutuZ This will fix the drifting issue and in my experience testing this it is precise to the minute. With restricted battery it may lose some precision tho.