mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-07 11:53:07 +02:00
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