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

Show zero instead of empty text when no sleeps are recorded #436

Closed
goldbattle opened this issue Dec 27, 2023 · 5 comments · Fixed by #465
Closed

Show zero instead of empty text when no sleeps are recorded #436

goldbattle opened this issue Dec 27, 2023 · 5 comments · Fixed by #465
Labels
confirmed Makes sense to fix / implement.

Comments

@goldbattle
Copy link

Reproducer steps
Just updated to 7.6.4.
Enabled automatic backups and display of average sleep length.
Return to the start screen and all my past recordings disappear.

Actual result
My tracks are gone.
I can still see there are some statistics that show that I have some sleeps..

Screenshot_20231227_154840_Plees Tracker.jpg
Screenshot_20231227_154836_Plees Tracker.jpg

I exported and it seems they are still recorded possibly? Should I try to reimport this csv?

Screenshot_20231227_155143_Sheets.jpg

Expected behavior
To not lose all my historical tracks. I have no backups, so everything is lost it seems?

@vmiklos
Copy link
Owner

vmiklos commented Dec 28, 2023

Sorry to hear that seems to be a data loss!

I just tried enabling automatic backup with a clean user profile and can't trivially reproduce this problem. Does it happen to you all the time you perform these steps or it happened only once?

Also, does this only happen with your phone or does it also happen in the emulator?

Last, does this happen even after you restart the app?

The internal storage is just sqlite and the stats are always calculated from scratch, so if you see your sleeps in the stats, then probably they are in the DB. This would suggest the DB is all fine, but the main activity's live update somehow gets confused and shows no sleeps. Does this still happen after you kill the app + start it again? I.e. is this a problem when you already changed your settings but the already running app tries to adapt itself to the new setting?

Let's try to clarify the reproducer steps to reach a state when this happens in a from-scratch emulator run, then it would be possible to debug this. Thanks.

@vmiklos vmiklos added the needinfo Further information is requested label Dec 28, 2023
@goldbattle
Copy link
Author

I was unable to pull out the database over adb, so not sure what I can do to provide.
I was able to record new sleeps fine, it seems the interface is just empty when I have not done any recent sleeps.
Seems that the history on the main menu is maybe the last weeks worth as compared to a list of the most recent ones.

image
image

I expected to see a list of my recent past sleeps, and then if there are no sleeps in the last week, it should read zero.
Should this be fixed or is this expected?

So I don't think there is any data lost, just that after changing a setting it seems to have refreshed the main page.

@vmiklos
Copy link
Owner

vmiklos commented Jan 23, 2024

Should this be fixed or is this expected?

In case you go to the "..." menu -> Settings and dashboard duration is set to "last week", then it's indeed expected that the main activity won't show sleeps other than during the last week.

So at the end this was just confusion on how the app works? Or is there something to fix here?

@goldbattle
Copy link
Author

goldbattle commented Jan 23, 2024 via email

@vmiklos
Copy link
Owner

vmiklos commented Jan 26, 2024

OK, that's finally actionable. :-)

@vmiklos vmiklos added confirmed Makes sense to fix / implement. and removed needinfo Further information is requested labels Jan 26, 2024
@vmiklos vmiklos changed the title All tracks lost after enabling backup Show zero instead of empty text when no sleeps are recorded Jan 26, 2024
vmiklos added a commit that referenced this issue Apr 21, 2024
Return the usual formatted string instead of an empty one.

Fixes <#436>.
vmiklos added a commit that referenced this issue Apr 21, 2024
Return the usual formatted string instead of an empty one.

Fixes <#436>.
vmiklos added a commit that referenced this issue Apr 21, 2024
Return the usual formatted string instead of an empty one.

Fixes <#436>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Makes sense to fix / implement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants