dubrowgn / wattz

An Android battery power status bar indicator
MIT License
187 stars 9 forks source link

DateTime since put on charging #10

Closed nata1993 closed 1 year ago

nata1993 commented 1 year ago

DateTime element showing date and time when phone was put on charge is constantly being refreshed to "now" while phone is being charged.

Running watt v1.7.

dubrowgn commented 1 year ago

I've been looking at different ways to solve this over the past few days. A working solution is actually quite complicated, so I may end up removing the feature for now.

dubrowgn commented 1 year ago

https://github.com/dubrowgn/wattz/commit/45e16a460060e183bd1e940eb620a645a53552f9 fixes this by making the StatusService own "ChargingSince". As long as the indicator is present, it will know when the phone is plugged or unplugged.

Available: https://github.com/dubrowgn/wattz/releases/tag/v1.8