Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep Tracking Pause Button #389

Open
LinuxinaBit opened this issue May 30, 2023 · 4 comments
Open

Sleep Tracking Pause Button #389

LinuxinaBit opened this issue May 30, 2023 · 4 comments
Labels
needinfo Further information is requested

Comments

@LinuxinaBit
Copy link

I've discovered something rather important that is missing, a button to pause sleep tracking.
It may seem unnecessary, but on nights when I wake up at 2AM for no reason, I would like to not have 10 hours of sleep throwing off my averages.
If this is implemented, a "sleep interruption" feature could also be added somewhere to represent how much your sleep has been interrupted, and track it.
Thank you.

@vmiklos
Copy link
Owner

vmiklos commented May 31, 2023

Hmm, the idea is that you can just tracking and then you start tracking again. The default is to show the average of daily sums, so you don't hurt your nice average if you stop for an hour, read a book, get sleepy again and then you start tracking.

With that in mind, does it still make sense to clutter the UI with pause functionality? If so, how would the UI for this look like? Currently you have a single FloatingActionButton to stop tracking, it's not clear to me how we would do a pause.

@vmiklos vmiklos added the needinfo Further information is requested label May 31, 2023
@LinuxinaBit
Copy link
Author

LinuxinaBit commented May 31, 2023 via email

@clicky6
Copy link

clicky6 commented Dec 8, 2023

+1

@vmiklos
Copy link
Owner

vmiklos commented Dec 8, 2023

Thinking about this a bit more, the pause functionality could be added with a long tap on the stop button. But then the question is what to do with the data model, which really just has a start and a stop timestamp for the sleep. If you pause for 1h, then just resume and a final stop would lead to a sleep that has the original start timestamp and the new stop timestamp and the length of the sleep would be incorrect.

If the use-case is to please the "average" graph, then perhaps this could be a new column in the sleeps table, which would be the total length of pauses in the sleep. That would be backwards-compatible, but need to handle that at several places, I guess.

Are you interested in doing a PR for this yourself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants