OutRun icon indicating copy to clipboard operation
OutRun copied to clipboard

Fix importing workouts from HealthKit

Open Amwam opened this issue 5 years ago • 1 comments

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)

Amwam avatar Oct 01 '20 13:10 Amwam

On further inspection, the reason why getAndAttachRoute sometimes fails, is because some workouts don't actually have a route

Amwam avatar Oct 02 '20 09:10 Amwam