-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Logic bug with bit-type auto-tracked habits #61
Comments
Bit type habits intentionally work like this, a
a
I agree that |
Ah, that makes sense. But it still seems confusing in the case of auto-tracked bit-type habits, because if I make 5 commits it will result in the day being marked Some possible options:
|
I agree with @christianboyle that something needs to change here. I currently don’t use any auto bit habits even though I have some use cases for them. The reason is I have no idea whether my hooks are running for the first time and should track up or if it’s already tracked and should do nothing.
This makes sense in the use case of the ui where I can see the affects of pressing enter and realize it didn’t do what I expected to. Hooks into scripts don’t have this luxury. Ps thanks for this library been using it for weeks now. |
I had mentioned this in another thread, but I am thinking of writing some kinda query system, so |
That would work |
If you have an auto-tracked habit that is defined as bit-type it will incorrectly toggle the state when multiple events occur in succession that result in an even-numbered state since it's
bool
and not checking for existing1
state prior to toggling.So the result is if I have
commit
defined as bit-type and make 3 commits it will show as incomplete in the display, but if I make a fourth commit it will be marked complete.The text was updated successfully, but these errors were encountered: