Skip to content

Commit

Permalink
Type contents order
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Jul 17, 2024
1 parent 5ccf18b commit 6758eda
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Sources/SpeziDevices/HealthMeasurements.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ import SwiftUI
/// - ``discardMeasurement(_:)``
@Observable
public final class HealthMeasurements: @unchecked Sendable {
#if compiler(<6)
public typealias WeightScaleKeyPath<Device> = KeyPath<Device, WeightScaleService>
public typealias BloodPressureKeyPath<Device> = KeyPath<Device, BloodPressureService>
#else
public typealias WeightScaleKeyPath<Device> = KeyPath<Device, WeightScaleService> & Sendable
public typealias BloodPressureKeyPath<Device> = KeyPath<Device, BloodPressureService> & Sendable
#endif

private let logger = Logger(subsystem: "ENGAGEHF", category: "HealthMeasurements")

/// Determine if UI components displaying pending measurements should be displayed.
Expand Down Expand Up @@ -135,14 +143,6 @@ public final class HealthMeasurements: @unchecked Sendable {
}
}

#if compiler(<6)
public typealias WeightScaleKeyPath<Device> = KeyPath<Device, WeightScaleService>
public typealias BloodPressureKeyPath<Device> = KeyPath<Device, BloodPressureService>
#else
public typealias WeightScaleKeyPath<Device> = KeyPath<Device, WeightScaleService> & Sendable
public typealias BloodPressureKeyPath<Device> = KeyPath<Device, BloodPressureService> & Sendable
#endif

/// Configure receiving and processing weight measurements from the provided service.
///
/// Configures the device's weight measurements to be processed by the Health Measurements module.
Expand Down

0 comments on commit 6758eda

Please sign in to comment.