Skip to content

Commit 7dc3f2e

Browse files
committed
Authorization is always required
1 parent 1679eb1 commit 7dc3f2e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Loop/Managers/DeviceDataManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ final class DeviceDataManager {
459459
return
460460
}
461461

462-
Task {
462+
Task { @MainActor in
463463
if let unit = await self.healthStore.cachedPreferredUnits(for: .bloodGlucose) {
464464
self.displayGlucoseUnitObservable.displayGlucoseUnitDidChange(to: unit)
465465
self.notifyObserversOfDisplayGlucoseUnitChange(to: unit)

Loop/Managers/OnboardingManager.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@ class OnboardingManager {
180180
}
181181

182182
private func ensureHealthStoreAuthorization(_ completion: @escaping () -> Void) {
183-
getHealthStoreAuthorization { authorization in
184-
guard authorization == .notDetermined else {
185-
completion()
186-
return
187-
}
188-
self.authorizeHealthStore { _ in completion() }
189-
}
183+
self.authorizeHealthStore { _ in completion() }
190184
}
191185

192186
private func ensureBluetoothAuthorization(_ completion: @escaping () -> Void) {

0 commit comments

Comments
 (0)