Skip to content

Commit

Permalink
Merge pull request #8 from SonamChugh13/omer
Browse files Browse the repository at this point in the history
Fixing nested if issue in TrackStatisticsUpdater
  • Loading branch information
omer-munam authored Feb 11, 2024
2 parents e1e773f + 0285876 commit 6b7becf
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,8 @@ public void addTrackPoint(TrackPoint trackPoint) {
currentSegment.addTotalDistance(movingDistance);
}

if (!currentSegment.isIdle() && !trackPoint.isSegmentManualStart()) {
if (lastTrackPoint != null) {
currentSegment.addMovingTime(trackPoint, lastTrackPoint);
}
}
if (!currentSegment.isIdle() && !trackPoint.isSegmentManualStart() && lastTrackPoint != null) {
currentSegment.addMovingTime(trackPoint, lastTrackPoint);

if (trackPoint.getType() == TrackPoint.Type.IDLE) {
currentSegment.setIdle(true);
Expand Down

0 comments on commit 6b7becf

Please sign in to comment.