Skip to content

Commit 9576f50

Browse files
committed
fix: Destination inheritance API
1 parent 8f9215c commit 9576f50

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

Sources/CombineNavigation/Destinations/StackDestination.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ open class StackDestination<
1111
Controller: CocoaViewController
1212
>: Weakifiable {
1313
private var _controllers: [StackElementID: Weak<Controller>] = [:]
14-
public var wrappedValue: [StackElementID: Controller] {
14+
15+
open var wrappedValue: [StackElementID: Controller] {
1516
let controllers = _controllers.compactMapValues(\.wrappedValue)
1617
_controllers = controllers.mapValues(Weak.init(wrappedValue:))
1718
return controllers
1819
}
19-
public var projectedValue: StackDestination<StackElementID, Controller> { self }
20+
21+
open var projectedValue: StackDestination<StackElementID, Controller> { self }
2022

2123
private var _initControllerOverride: ((StackElementID) -> Controller)?
2224

@@ -45,7 +47,7 @@ open class StackDestination<
4547
}
4648
}
4749

48-
@_spi(Internals) public class func initController(
50+
@_spi(Internals) open class func initController(
4951
for id: StackElementID
5052
) -> Controller {
5153
return Controller()

Sources/CombineNavigation/Destinations/TreeDestination.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import FoundationExtensions
88
@propertyWrapper
99
open class TreeDestination<Controller: CocoaViewController>: Weakifiable {
1010
private weak var _controller: Controller?
11-
public var wrappedValue: Controller? { _controller }
12-
public var projectedValue: TreeDestination<Controller> { self }
11+
open var wrappedValue: Controller? { _controller }
12+
open var projectedValue: TreeDestination<Controller> { self }
1313

1414
private var _initControllerOverride: (() -> Controller)?
1515

@@ -36,7 +36,7 @@ open class TreeDestination<Controller: CocoaViewController>: Weakifiable {
3636
}
3737
}
3838

39-
@_spi(Internals) public class func initController() -> Controller {
39+
@_spi(Internals) open class func initController() -> Controller {
4040
return Controller()
4141
}
4242

Tests/CombineNavigationTests/Destinations/StackDestinationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import XCTest
22
import CocoaAliases
3-
@_spi(Internals) @testable import CombineNavigation
3+
@_spi(Internals) import CombineNavigation
44

55
#if canImport(UIKit) && !os(watchOS)
66
final class StackDestinationTests: XCTestCase {

Tests/CombineNavigationTests/Destinations/TreeDestinationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import XCTest
22
import CocoaAliases
3-
@_spi(Internals) @testable import CombineNavigation
3+
@_spi(Internals) import CombineNavigation
44

55
#if canImport(UIKit) && !os(watchOS)
66
final class TreeDestinationTests: XCTestCase {

0 commit comments

Comments
 (0)