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

Fixes status screen negative size and rewards all being in the same line. #11

Merged
merged 2 commits into from
Sep 24, 2017

Conversation

jamiguet
Copy link
Contributor

When in habitica status bar the current value is higher than the maximum the client computes a negative length for the status string resulting in screen not rendering correctly.
The situation is possible for the mana status in which then end of task or a spell can assign extra mana which may be removed at cron. It is hence a valid situation for a status in which the current is higher than the maximum.

The current fix resolves this situation. by just taking as max the highest of both values.

@jamiguet
Copy link
Contributor Author

The second commit fixes the issue in which the rewards are all in the same line.
It just appends a \n at the end of each reward entry.
This enable reward purchase as the rewards become each an actionable org item

@jamiguet jamiguet changed the title Patches the status part of the screen if current is higher than current Fixes status screen negative size and rewards all being in the same line. Sep 24, 2017
@jamiguet jamiguet closed this Sep 24, 2017
@jamiguet jamiguet reopened this Sep 24, 2017
@abrochard abrochard merged commit 752bd37 into abrochard:master Sep 24, 2017
@abrochard
Copy link
Owner

Looks good. Thanks for your contribution!

@jamiguet
Copy link
Contributor Author

jamiguet commented Sep 24, 2017 via email

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

Successfully merging this pull request may close these issues.

2 participants