ethanmdavidson/DeathProgressOriginal

change redraw frequency based on number of digits displayed

Opened this issue · 0 comments

Currently, the wallpaper redraws every hour (excluding unscheduled events like settings changing). However, this is not optimal in all cases:

  • if a user is only displaying a few (e.g. 3) decimal places, the wallpaper could save power by only redrawing every few hours.
  • If a user is displaying a lot (e.g. 7) decimal places, the wallpaper will need to refresh more frequently for the user to see changes at that level of precision.

Instead, we should store the currently displayed value and only redraw if the displayed value is going to change. There is a tradeoff here with (probably negligably) increased memory usage and increased processing being done to calculate whether or not to do a full redraw. Should do some profiling to investigate this. Also would need to set up a redraw scheduler, since the current method of redrawing in onVisibilityChanged() would not be able to handle frequent redraws