Closed kirvlasov closed 3 months ago
This would defeat the purpose of setting the serving size on foods. Please explain the bug this fixes, the steps to re-produce and what you expect to happen.
Whether it defeats or not, the calculation is not correct now. I updated the starter of the conversation with an example.
Sorry, here is the third screenshot to understand the issue As you see, when we input 100 grams, the data doesn't match the reference values I showed before
Your above example doesn't look like a bug to me. You set your food to be 61 calories per 244 grams, then you entered 100 grams.
61 / 244 = 0.25 0.25 * 100 = 25
I don't set my food. That's the database that you provide with the App. And this database contains nutrition facts per 100 g, not per first serving size.
So the way you calculate nutrition facts per gram now, it's always returning incorrect values for the whole database except for items where 1st serving size is 100g
Oh I see what happened now it's because I've conflated these new fields with the old ones
I need to add a new field for the user specified serving size, and move this MyFoodData field serving weight back below with the other fields, then it defaults to 100 if the user hasn't specified a serving size.
I will be happy with any solution that fixes the App!
Sadly this will make some peoples entries incorrect if they took a version of the app with this bug and started editing the servingWeight1G field, this will however fix all the built-in foods which there are so many it's worth doing.
Reference values are always per 100g, not per 1st serving value.
You can check it yourself, compare the values with what google finds about their nutrition.