Bugfix: moving time was not computed.

Introduced in 6be9d2477c (first released in v4.9.0)

Fixes #1756.
This commit is contained in:
Dennis Guse
2024-05-04 20:11:19 +02:00
parent c96635c46b
commit 1ed807054b
4 changed files with 78 additions and 14 deletions
@@ -107,6 +107,7 @@ public class TrackStatistics {
*
* @param other another statistics data object
*/
//TODO Should be refactored to append only [mainly due to isIdle] (NOTE: This requires to use a custom value object for AggregatedStatistics; this is anyhow recommended).
public void merge(TrackStatistics other) {
if (startTime == null) {
startTime = other.startTime;
@@ -119,6 +120,8 @@ public class TrackStatistics {
stopTime = stopTime.isAfter(other.stopTime) ? stopTime : other.stopTime;
}
isIdle = other.isIdle; //TODO This implicitly assumes append mode.
if (avgHeartRate == null) {
avgHeartRate = other.avgHeartRate;
} else {