Skip to content

Commit a3998cd

Browse files
author
Andrii Bondarchuk
committed
Sort ride activities by StartDateLocal before returning
Activities are now ordered chronologically by their local start date after filtering for rides, ensuring consistent ordering in the returned list.
1 parent 8380333 commit a3998cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/FitSyncHub.Functions/Functions/SyncIntervalsICUWithGarminHttpTriggerFunction.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ private async Task<List<ActivityResponse>> GetRideActivities(DateOnly date, Canc
170170
return [.. activities
171171
// skip strava activities
172172
.WhereNotNull()
173-
.Where(x => x.IsRide)];
173+
.Where(x => x.IsRide)
174+
.OrderBy(x => x.StartDateLocal)];
174175
}
175176

176177
private async Task<ActivitySummary> UpdateActivitiesWithNewTssAndReturnSummary(

0 commit comments

Comments
 (0)