Two issues: 1. expend was null when BMR=null, even if GPS sessions had kcal. Now shows activity kcal alone if BMR unavailable. 2. calcBmr returned null if height/birth_year missing, but user had weight in profile. Now falls back: weight_log -> latestWeight -> profile.weight_kg. Also returns bmr_formula if height missing instead of null. BMR calculation chain: - bmr_estimated (manual override) takes priority - Then formula: needs height + birth_year + weight (from any source) - Then bmr_formula (pre-computed value in profile) - Last resort: null → expenditure shows activity kcal only |
||
|---|---|---|
| .. | ||
| css | ||
| data | ||
| js | ||
| lib | ||
| index.html | ||