Skip to content

Conversation

@DmitrySvetlichny
Copy link
Contributor

No description provided.

+ (long)liveTimeSpanForGpx:(OASGpxFile *)gpx withoutGaps:(BOOL)withoutGaps
{
long totalActiveDuration = 0;
long earliestSegmentStart = LLONG_MAX;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LONG_MAX ?

for (OASTrkSegment *segment in track.segments)
{
NSArray<OASWptPt *> *points = segment.points;
if (points.count <= 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (points.count < 2) {}

}
}

if (earliestSegmentStart == LLONG_MAX)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LONG_MAX

((!currentTrack.tracks || currentTrack.tracks.count == 0) || currentTrack.tracks[0].generalTrack);

OASGpxTrackAnalysis *analysis = [currentTrack getAnalysisFileTimestamp:0];
long timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we have same code in java (android). Why it works correctly in android and wrong in ios?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update of Duration and recording indicator

4 participants