forked from upstream-mirrors/OpenTracks
Re-calculate the calorie while user change the activity type of track. Show standard "value_unknown" (-) when the activity type is not supported.
This commit is contained in:
@@ -586,6 +586,8 @@ public class TripStatistics implements Parcelable {
|
||||
public void addCalorie(double calorieAdded) {
|
||||
if (calorieAdded != INVALID_CALORIE) {
|
||||
this.calorie += calorieAdded;
|
||||
} else {
|
||||
this.calorie = INVALID_CALORIE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user