Surye / mfp-keto-userscript

MyFitnessPal Keto Script
164 stars 54 forks source link

Support entries labeled net carbs #31

Closed aikar closed 7 years ago

aikar commented 7 years ago

Hi,

I've updated the script to tolerate negative net carbs (or if the entry has "Net Carbs" in the title) by simply ignoring them and assuming fiber is already deducted.

I prefer net carb entries so that the numbers are closer when viewing on mobile, so this lets the script still work fine.

Updated readme so that it would link correctly in my fork to make it relative, so i suggest squashing the merge.

aikar commented 7 years ago

This will resolve #28

Surye commented 7 years ago

This is a good solution to the problem, it's not foolproof as some net carb entries won't be labeled as such, but when they are it's better behavior.

Surye commented 7 years ago

alreadyCounted is being added incorrectly in the meal totals. It's calculating for the whole day, then adding that to each meal. To reproduce have 2 net carb items in different meals.