diff --git a/KisaniCal/Managers/HealthKitManager.swift b/KisaniCal/Managers/HealthKitManager.swift index 8ab8332..7ef94f7 100644 --- a/KisaniCal/Managers/HealthKitManager.swift +++ b/KisaniCal/Managers/HealthKitManager.swift @@ -168,7 +168,7 @@ final class HealthKitManager: ObservableObject { func dailyReference(from start: Date, to end: Date) async -> [String: (steps: Int?, calories: Int?, restingHR: Int?)] { guard authorized, isAvailable else { return [:] } let anchor = Calendar.current.startOfDay(for: start) - var interval = DateComponents(); interval.day = 1 + let interval = DateComponents(day: 1) async let steps = statsCollection(.stepCount, unit: .count(), options: .cumulativeSum, anchor: anchor, end: end, interval: interval) async let cals = statsCollection(.activeEnergyBurned, unit: .kilocalorie(), options: .cumulativeSum, anchor: anchor, end: end, interval: interval)