chore: lint and format cleanup

This commit is contained in:
Peter Steinberger
2026-01-04 16:24:10 +01:00
parent fd95ededaa
commit 026a25d164
45 changed files with 627 additions and 496 deletions

View File

@@ -138,14 +138,14 @@ enum PermissionManager {
}
private static func ensureLocation(interactive: Bool) async -> Bool {
let status = CLLocationManager.authorizationStatus()
let status = CLLocationManager().authorizationStatus
switch status {
case .authorizedAlways, .authorizedWhenInUse:
case .authorizedAlways:
return true
case .notDetermined:
guard interactive else { return false }
let updated = await LocationPermissionRequester.shared.request(always: false)
return updated == .authorizedAlways || updated == .authorizedWhenInUse
return updated == .authorizedAlways
case .denied, .restricted:
if interactive {
LocationPermissionHelper.openSettings()
@@ -198,9 +198,10 @@ enum PermissionManager {
case .camera:
results[cap] = AVCaptureDevice.authorizationStatus(for: .video) == .authorized
case .location:
let status = CLLocationManager.authorizationStatus()
results[cap] = status == .authorizedAlways || status == .authorizedWhenInUse
let status = CLLocationManager().authorizationStatus
results[cap] = status == .authorizedAlways
}
}
return results