chromadoze icon indicating copy to clipboard operation
chromadoze copied to clipboard

Implement onboard timer/sleep timer.

Open notwithering opened this issue 1 year ago • 2 comments

I've taken a few hours out of my day to add a sleep timer to this app. I find it quite annoying that I needed another app to stop ChromaDoze after a few hours, so I decided I would give myself and everyone else the ease of the use that comes with an onboard sleep timer.

I have not used it for an extended period of time yet, tonight I'll try to use it for ~2 hours while I sleep to see if it's all good.

This should solve point 4 of #25, partially solve #10, solve #3, and also partially solve #1

notwithering avatar Nov 17 '24 05:11 notwithering

Just woke up, the timer does not work while the screen is off. I'll try to fix it today.

notwithering avatar Nov 17 '24 13:11 notwithering

Alright, this should be all good now. I attempted to add a fade out option but I'm not familiar enough with the project so I was unable to properly add it. I tried to hook into NoiseService and other classes but was never able to make it work correctly. I left an asset I quickly mocked up in the res, in commit 4a8d0a4f5ef81d097c83406ee9b61e87e58f153f (later reverted) I also provided a change in timer_fragment.xml that added the option for fade out that may be used in the future.

notwithering avatar Nov 17 '24 19:11 notwithering