Fixed Widget stats
This commit is contained in:
@@ -21,7 +21,7 @@ final class LiveActivityManager {
|
||||
do {
|
||||
currentActivity = try Activity<SessionActivityAttributes>.request(
|
||||
attributes: attributes,
|
||||
contentState: initialContentState,
|
||||
content: .init(state: initialContentState, staleDate: nil),
|
||||
pushType: nil
|
||||
)
|
||||
} catch {
|
||||
@@ -38,13 +38,13 @@ final class LiveActivityManager {
|
||||
totalAttempts: totalAttempts,
|
||||
completedProblems: completedProblems
|
||||
)
|
||||
await currentActivity.update(using: updatedContentState, alertConfiguration: nil)
|
||||
await currentActivity.update(.init(state: updatedContentState, staleDate: nil))
|
||||
}
|
||||
|
||||
/// Call this when a ClimbSession ends to end the Live Activity
|
||||
func endLiveActivity() async {
|
||||
guard let currentActivity else { return }
|
||||
await currentActivity.end(using: nil, dismissalPolicy: .immediate)
|
||||
await currentActivity.end(nil, dismissalPolicy: .immediate)
|
||||
self.currentActivity = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user