Skip to content

Commit

Permalink
VIT-7406: iOS: Lower priority resource is stuck when higher priority …
Browse files Browse the repository at this point in the history
…resource has errored (#240)
  • Loading branch information
andersio authored Sep 10, 2024
1 parent e18de76 commit 3e44a45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/VitalHealthKit/HealthKit/VitalHealthKitClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ extension VitalHealthKitClient {
return true
}
// OR has no sync attempt
return resourceProgress.syncs.isEmpty
// OR has errored
let lastStatus = resourceProgress.latestSync?.lastStatus
return lastStatus == nil || lastStatus == .error || lastStatus == .cancelled || lastStatus == .timedOut
}

// Rescue these resources
Expand Down

0 comments on commit 3e44a45

Please sign in to comment.