mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-04 02:13:07 +02:00
Move .merge() from SegmentStatisticUpdater to Statistics.
This is a functional change as maxSpeed is now determined by Segment (rather than the joined Segment).
This commit is contained in:
@@ -94,7 +94,7 @@ public class TrackStatisticsUpdater {
|
||||
* Compute TrackStatistics.
|
||||
*/
|
||||
public Statistics getTrackStatistics() {
|
||||
return currentSegment.aggregate(statisticsWithoutCurrentSegment);
|
||||
return currentSegment.merge(statisticsWithoutCurrentSegment);
|
||||
}
|
||||
|
||||
public boolean isIdle() {
|
||||
@@ -200,7 +200,7 @@ public class TrackStatisticsUpdater {
|
||||
|
||||
private void reset(TrackPoint trackPoint) {
|
||||
if (currentSegment.isInitialized()) {
|
||||
statisticsWithoutCurrentSegment = currentSegment.aggregate(statisticsWithoutCurrentSegment);
|
||||
statisticsWithoutCurrentSegment = currentSegment.merge(statisticsWithoutCurrentSegment);
|
||||
}
|
||||
currentSegment.reset(trackPoint.getTime());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user