feat: watch design from figma
This commit is contained in:
@@ -14,6 +14,8 @@ public final class WatchAppModel: ObservableObject {
|
||||
public let haptics: WatchHapticService
|
||||
public let connectivity: WatchConnectivityService
|
||||
|
||||
private var serviceSubscriptions = Set<AnyCancellable>()
|
||||
|
||||
private let defaults: UserDefaults
|
||||
private let onboardingKey = "haptika.watch.onboarding.completed.v1"
|
||||
private let deviceIDKey = "haptika.watch.device.id.v1"
|
||||
@@ -82,6 +84,11 @@ public final class WatchAppModel: ObservableObject {
|
||||
}
|
||||
|
||||
private func wireServices() {
|
||||
// Relay nested service changes so all Watch screens receive live updates.
|
||||
for publisher in [store.objectWillChange, measurement.objectWillChange, haptics.objectWillChange, connectivity.objectWillChange] {
|
||||
publisher.sink { [weak self] _ in self?.objectWillChange.send() }
|
||||
.store(in: &serviceSubscriptions)
|
||||
}
|
||||
measurement.onCompleted = { [weak self] summary in self?.enqueueMeasurement(summary) }
|
||||
measurement.onLiveHeartRate = { [weak self] sample in
|
||||
guard let self,
|
||||
|
||||
Reference in New Issue
Block a user