isaakhanimann / psychonautwiki-journal-android

GNU General Public License v3.0
50 stars 10 forks source link

Buggy stats screen, skips days #41

Closed homerjunior closed 4 months ago

homerjunior commented 5 months ago

I have recorded everyday since the 4th January but as you can see it has gaps in the month timeline, recorded every day this week yet half are missing in weekly viewScreenshot_20240131-163625.png

Screenshot_20240131-163621.png

isaakhanimann commented 5 months ago

Can you send me the export of your journal so I can see the specific times of the experiences and ingestions? My username is @isaakhanimann on Telegram

homerjunior commented 5 months ago

Could I grab an email? I don't use telegram

isaakhanimann commented 5 months ago

Thank you. Sure here: retests.unarmed-0b@icloud.com

jaromeyer commented 4 months ago

this is most likely expected behaviour. each "day" is not really a discrete day (as in date) but rather a span of 24 hours. so only if you are looking at the statistics at exactly midnight each bar should correspond to a day. otherwise if you consumed twice during 24 hours the corresponding bar will contain two experiences while the neighbouring ones might be empty. in you screenshot the experiences aren't "lost", they are just bunched up in every second 24 hour interval.

tldr; the right most bar contains all experiences during the last 24 hours. the second bar contains all experiences during the 24 hours before (48 hours ago until 24 hours ago) and so forth

i hope that makes sense haha

homerjunior commented 4 months ago

There is no 24 hour gap sadly

homerjunior commented 4 months ago

Just put a gap of well over 24 hours and 30 day view shows no gap lol

isaakhanimann commented 4 months ago

I can't reproduce this issue. The way the algorithm works is that it only looks at the sort date of the experience and assigns the whole experience to the day of the sort date. Even if other ingestions in the experience are on the next day. The sort date is fixed as the time of the first ingestion when the experience is created. So if you were deleting ingestions and adding new ones at different days to the same experience the whole thing might be messed up.

isaakhanimann commented 4 months ago

Actually the issue was maybe because it started from the current time and took 24 hour steps backwards. So I adjusted it to start from the current end of day and then moving back 24 hours. Fix is in the next update.