OutRun
OutRun copied to clipboard
Fix importing workouts from HealthKit
Resolves #20
The count wasn't being updated when getAndAttachRoute or getAndAttachSteps fails.
Moving it outside the loop ensures that it is updated properly, regardless of inner blocks failing.
Need to understand why the route isn't being imported correctly, however this should resolve the issue with an infinite loading spinner being displayed. (Getting a printed error of Error - could not parse HKSample to HKWorkoutRoute)
On further inspection, the reason why getAndAttachRoute sometimes fails, is because some workouts don't actually have a route