Skip to content

Commit

Permalink
Fix entering per serving - 1.0.22 🚀
Browse files Browse the repository at this point in the history
Honestly i'm getting a bit mind-fucked
by this.
  • Loading branch information
brandonp2412 committed May 31, 2024
1 parent ac4a454 commit 5acba2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/233.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix entering per serving
6 changes: 1 addition & 5 deletions lib/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ EntriesCompanion calculateEntry({
final grams = quantity / 4.184;
quantity100G = grams / 100;
} else if (unit == 'serving') {
final weightG = convertToGrams(
food.servingWeight1G ?? 100,
food.servingUnit ?? 'grams',
);
quantity100G = quantity * (weightG / 100);
quantity100G = quantity;
} else {
quantity100G = convertToGrams(quantity, unit) / 100;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fit_book
description: Track your calories - Completely offline!
publish_to: none
version: 1.0.21+22
version: 1.0.22+23
environment:
sdk: '>=3.3.3 <4.0.0'
dependencies:
Expand Down

0 comments on commit 5acba2c

Please sign in to comment.