Closed clach04 closed 4 years ago
Recommend removing:
persist_set_battery_level()
Good catch. I think the reason I persisted the battery level was because I was dead set on using the battery level that I already received from battery_state_service_subscribe
rather than making another call to battery_state_service_peek
. In hindsight, peeking the battery level is probably more efficient than saving and accessing from storage.
I'll merge that in and remove the persistence stuff sometime soon.
I've been thinking about this. I still think my quick fix is the best thing for now. One idea would be to refactor the persist battery code to use a static/global variable then the peek in my quick fix could be removed.
That way the form would be the same but the location and name of the function calls would be the same.
Included in v1.11.0
I think this is true for all battery level changes but I'm documenting what I saw today:
This appears to be due to the watchface persisting and then reading the battery level to storage. I'm not sure why it does this. I'll attach a quick fix but I think the persistence code should be removed.