Skip to content

Commit

Permalink
Added MainActor to BottomSheet
Browse files Browse the repository at this point in the history
  • Loading branch information
juicyfru1t committed Oct 1, 2024
1 parent ce32c39 commit 1d28f96
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Sources/Addons/BottomSheet/BottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public struct BottomSheet: Sendable {
public let presentAnimationOptions: BottomSheetAnimationOptions
public let dismissAnimationOptions: BottomSheetAnimationOptions

public let canEndEditing: (@Sendable () -> Bool)?
public let shouldDismiss: (@Sendable () -> Bool)?
public let canEndEditing: (@MainActor @Sendable () -> Bool)?
public let shouldDismiss: (@MainActor @Sendable () -> Bool)?

public let didAttemptToDismiss: (@Sendable () -> Void)?
public let didAttemptToDismiss: (@MainActor @Sendable () -> Void)?

public let willDismiss: (@Sendable () -> Void)?
public let didDismiss: (@Sendable () -> Void)?
public let willDismiss: (@MainActor @Sendable () -> Void)?
public let didDismiss: (@MainActor @Sendable () -> Void)?

public let didChangeSelectedDetentKey: (@Sendable(_ detentKey: BottomSheetDetentKey?) -> Void)?
public let didChangeSelectedDetentKey: (@MainActor @Sendable (_ detentKey: BottomSheetDetentKey?) -> Void)?

public init(
detents: [BottomSheetDetent]? = nil,
Expand All @@ -48,12 +48,12 @@ public struct BottomSheet: Sendable {
changesAnimationOptions: BottomSheetAnimationOptions = .changes,
presentAnimationOptions: BottomSheetAnimationOptions = .transition,
dismissAnimationOptions: BottomSheetAnimationOptions = .transition,
canEndEditing: (@Sendable () -> Bool)? = nil,
shouldDismiss: (@Sendable () -> Bool)? = nil,
didAttemptToDismiss: (@Sendable () -> Void)? = nil,
willDismiss: (@Sendable () -> Void)? = nil,
didDismiss: (@Sendable () -> Void)? = nil,
didChangeSelectedDetentKey: (@Sendable (_ detentKey: BottomSheetDetentKey?) -> Void)? = nil
canEndEditing: (@MainActor @Sendable () -> Bool)? = nil,
shouldDismiss: (@MainActor @Sendable () -> Bool)? = nil,
didAttemptToDismiss: (@MainActor @Sendable () -> Void)? = nil,
willDismiss: (@MainActor @Sendable () -> Void)? = nil,
didDismiss: (@MainActor @Sendable () -> Void)? = nil,
didChangeSelectedDetentKey: (@MainActor @Sendable (_ detentKey: BottomSheetDetentKey?) -> Void)? = nil
) {
self.detents = detents ?? [.large]
self.selectedDetentKey = selectedDetentKey
Expand Down

0 comments on commit 1d28f96

Please sign in to comment.