Skip to content

Commit

Permalink
feature(swift 6 concurrency): Make NavigationControllerFactory confor…
Browse files Browse the repository at this point in the history
…m to Sendable.
  • Loading branch information
erikdrobne committed Mar 24, 2024
1 parent 920303c commit 5f38de3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import Foundation

@MainActor
protocol NavigationControllerCreatable {
func makeNavigationDelegate(_ transitions: [Transitionable]) -> NavigationControllerDelegateProxy
func makeNavigationController(
Expand All @@ -17,16 +16,18 @@ protocol NavigationControllerCreatable {
}

/// A factory class for creating navigation controllers and their delegates.
public final class NavigationControllerFactory: NavigationControllerCreatable {
public final class NavigationControllerFactory: NavigationControllerCreatable, Sendable {

public init() {}

@MainActor
public func makeNavigationDelegate(_ transitions: [Transitionable]) -> NavigationControllerDelegateProxy {
let transitionProvider = TransitionProvider(transitions: transitions)
let transitionHandler = NavigationControllerTransitionHandler(provider: transitionProvider)
return NavigationControllerDelegateProxy(transitionHandler: transitionHandler)
}

@MainActor
public func makeNavigationController(
isNavigationBarHidden: Bool = true,
delegate: NavigationControllerDelegateProxy? = nil
Expand Down

0 comments on commit 5f38de3

Please sign in to comment.