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

fix: decrementing points after no updates in some time #89

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

J-467
Copy link
Contributor

@J-467 J-467 commented Apr 22, 2024

Summary of PR

Fixed the logic to decrement points after the user doesn't update their habit after some time
Fixed minor logic in PointService such setting minimum and maximum points

Checklist before requesting a review

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I have tested on the iOS simulator
  • I have made corresponding changes to the documentation

Todos & Follow ups

@J-467 J-467 added the fix label Apr 22, 2024
@J-467 J-467 self-assigned this Apr 22, 2024
@J-467 J-467 force-pushed the J/fix/decrementing_points branch from 33b402c to b676910 Compare April 22, 2024 01:22
Copy link
Contributor

@mina1957 mina1957 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Julian! looks great !

newPoints.studying_points = Math.min(newPoints.studying_points || 0, 22);

console.log("New Points", newPoints);
// ensure that no points are non-negative and not over their maxium. if they are, reduce to maximum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, was thinking about that actually!

@J-467 J-467 merged commit b12b098 into main Apr 22, 2024
1 check passed
@J-467 J-467 deleted the J/fix/decrementing_points branch April 22, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants