Skip to content

Commit

Permalink
add intent to update CardViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jun 25, 2024
1 parent da1e5c2 commit b153c7e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ open class CardViewModel: ObservableObject {
/// A custom details information string to display for the task of the view model.
public private(set) var detailsInformation: String?

// MARK: Private properties

/// Create an instance with specified content for an event. The view will update when changes
/// occur in the store.
/// - Parameters:
Expand All @@ -81,4 +79,14 @@ open class CardViewModel: ObservableObject {
self.event = event
}

// MARK: Intents

/// Update the current value with the latest valie.
/// - Parameters:
/// - value: The new value.
@MainActor
public func updateValue(_ value: OCKOutcomeValue) {
self.value = value
}

}

0 comments on commit b153c7e

Please sign in to comment.