Skip to content

Commit

Permalink
Opt-out from RxNavigationControllerDelegateProxy being a @mainactor
Browse files Browse the repository at this point in the history
Apparently, moving the `UINavigationControllerDelegate` conformance to an extension makes it so `RxNavigationControllerDelegateProxy` is not recognized as `@MainActor`, avoiding compilation errors when using RxCocoa.

Fixes ReactiveX#2347
  • Loading branch information
marcelofabri committed Sep 7, 2021
1 parent fe8f41d commit 9c6e4ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RxCocoa/iOS/Proxies/RxNavigationControllerDelegateProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
/// For more information take a look at `DelegateProxyType`.
open class RxNavigationControllerDelegateProxy
: DelegateProxy<UINavigationController, UINavigationControllerDelegate>
, DelegateProxyType
, UINavigationControllerDelegate {
, DelegateProxyType {

/// Typed parent object.
public weak private(set) var navigationController: UINavigationController?
Expand All @@ -35,4 +34,6 @@
self.register { RxNavigationControllerDelegateProxy(navigationController: $0) }
}
}

extension RxNavigationControllerDelegateProxy: UINavigationControllerDelegate {}
#endif

0 comments on commit 9c6e4ab

Please sign in to comment.