Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

fix(watch): arm the forgotten-workout check after a relaunch too (#790 follow-up)

Duarte Santosacd74d913b6f
diff --git a/frontend/ios/App/Watch/SessionStore.swift b/frontend/ios/App/Watch/SessionStore.swift
index 148c3b01c..e1b493ebd 100644
--- a/frontend/ios/App/Watch/SessionStore.swift
+++ b/frontend/ios/App/Watch/SessionStore.swift
@@ -161,6 +161,9 @@ final class SessionStore: NSObject, ObservableObject, WCSessionDelegate, UNUserN
self.health.start(workoutId: w.id, type: w.healthType)
}
self.armIdleCheck()
+ // `state = saved` above ran in init, where its didSet does not: the forgotten-
+ // workout check is armed here (a workout left running overnight ends now).
+ self.watchIdle()
}
}
}