Skip to content

Commit

Permalink
fix workout string bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mjoerke committed Mar 30, 2024
1 parent 8c6f4d5 commit 1e9f997
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Prisma/Helper/String+HealthKitIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ extension String {
/// converts a HKSample Type string representation to a lower cased id.
/// e.g. "HKQuantityTypeIdentifierStepCount" => "stepcount".
var healthKitDescription: String {
if self == "workout" {
return self
if self == "workout" || self == "HKWorkoutTypeIdentifier" {
return "workout"

Check warning on line 17 in Prisma/Helper/String+HealthKitIdentifier.swift

View check run for this annotation

Codecov / codecov/patch

Prisma/Helper/String+HealthKitIdentifier.swift#L16-L17

Added lines #L16 - L17 were not covered by tests
}

let prefixes = ["HKQuantityTypeIdentifier", "HKCategoryTypeIdentifier", "HKCorrelationTypeIdentifier", "HKWorkoutTypeIdentifier"]
Expand Down
2 changes: 1 addition & 1 deletion Prisma/PrismaDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class PrismaDelegate: SpeziAppDelegate {
Set(PrismaDelegate.healthKitSampleTypes),
/// predicate to request data from one month in the past to present.
predicate: HKQuery.predicateForSamples(
withStart: Calendar.current.date(byAdding: .month, value: -1, to: .now),
withStart: Calendar.current.date(byAdding: .month, value: -6, to: .now),
end: nil,
options: .strictEndDate
),
Expand Down

0 comments on commit 1e9f997

Please sign in to comment.