Skip to content

Commit

Permalink
Constraint adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar committed Oct 12, 2023
1 parent 6813817 commit acffaa2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Sources/SpeziOnboarding/OnboardingConstraint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import Spezi
public protocol OnboardingConstraint: Standard {
/// Adds a new exported consent form represented as `PDFDocument` to the `Standard` conforming to ``OnboardingConstraint``.
///
/// - Parameter consent: The exported consent form represented as `PDFDocument` that should be added.
func store(consent: PDFDocument) async
/// - Parameters:
/// - consent: The exported consent form represented as `PDFDocument` that should be added.
/// - name: The name components used in the consent form.
func store(consent: PDFDocument, name: PersonNameComponents) async
}
10 changes: 6 additions & 4 deletions Sources/SpeziOnboarding/OnboardingDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import SwiftUI
/// protocol to store exported consent forms.
/// ```swift
/// actor ExampleStandard: Standard, OnboardingConstraint {
/// func store(consent: Data) {
/// func store(consent: Data, name: PersonNameComponents) {
/// ...
/// }
/// }
Expand All @@ -42,10 +42,12 @@ public class OnboardingDataSource: Component, ObservableObject, ObservableObject

/// Adds a new exported consent form represented as `PDFDocument` to the ``OnboardingDataSource``.
///
/// - Parameter consent: The exported consent form represented as `PDFDocument` that should be added.
public func store(_ consent: PDFDocument) async {
/// - Parameters:
/// - consent: The exported consent form represented as `PDFDocument` that should be added.
/// - name: The name components used in the consent form.
public func store(_ consent: PDFDocument, name: PersonNameComponents) async {
Task { @MainActor in
await standard.store(consent: consent)
await standard.store(consent: consent, name: name)
}
}
}

0 comments on commit acffaa2

Please sign in to comment.