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

Bugs with the "recent average" function? #39

Closed
1 task done
unbiaseduser opened this issue Oct 19, 2022 · 4 comments · Fixed by #41
Closed
1 task done

Bugs with the "recent average" function? #39

unbiaseduser opened this issue Oct 19, 2022 · 4 comments · Fixed by #41
Assignees
Labels
bug Something isn't working

Comments

@unbiaseduser
Copy link
Contributor

unbiaseduser commented Oct 19, 2022

Afaik the "recent average" function calculates the average of the last 3 abstaining periods. With that in mind, I'd like to report some, uh, weird behavior with it:

  • If the addiction has never been relapsed at all, the average displays the time of the current abstaining period. That's kinda odd (and wrong as well), since there's no abstaining history to begin with.
  • If it has been relapsed, when you first log the relapse, the average is calculated and displayed correctly. However, when you close the app and open it again, the average displays the time of the new abstaining period.

Example: If I create an addiction with the time of 1 hour ago and I log the relapse, the average is displayed as 20 minutes (which is correct). However, if I close and open the app again, if the time of the new period is 10 seconds, when I open the app, the "average" is displayed as 10 seconds instead of the actual average value.

Am i gonna fix it?

  • Yes, but only after UI improvements #38 since i'm not exactly familiar with resolving merge conflicts and stuff. If you know how, plz teach me.
@KiARC
Copy link
Owner

KiARC commented Oct 20, 2022

  • That is something I need to fix, yeah
  • It does? I don't know why that is, I'll have to check

@KiARC
Copy link
Owner

KiARC commented Oct 20, 2022

And dw I'm good with merges

@KiARC KiARC added the bug Something isn't working label Oct 20, 2022
@unbiaseduser
Copy link
Contributor Author

Oh, i actually already fixed it. I'll open a PR any second now.
Also, i added "stop" functionality and history feature as well, maybe you can try out my branch and give feedback? (Don't mind the README lol, i was just kinda overreacting.)

@KiARC
Copy link
Owner

KiARC commented Oct 20, 2022 via email

@KiARC KiARC linked a pull request Oct 20, 2022 that will close this issue
@KiARC KiARC closed this as completed in #41 Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants