Bug description
Basically on startup the app will show AScreen with a variable value of nil to display a loading screen. The deeplinker will parse the link into the following path [AScreen(value: 20), BScreen()]. Since the deeplinker uses replace(path:) it will successfully replace AScreen but fails at presenting BScreen. Parsing the link so that the value of AScreen is nil will present BScreen fine. So it seems the issue is with the value changing.
Steps to reproduce
Example App
Using the code below seems to solve the issue
extension Screen {
static func == (lhs: Self, rhs: Self) -> Bool {
lhs.presentationStyle == rhs.presentationStyle && type(of: lhs) == type(of: rhs)
}
}
public extension AnyScreen {
static func == (lhs: Self, rhs: Self) -> Bool {
lhs.screen == rhs.screen
}
}
Expected behavior
App should navigate to BScreen even when the value in AScreen changes
Environment
- Xcode 13
- Swift 5.3
- OS: iOS 15
- Package v0.2.0
Additional context
Related: #74 (comment)
Bug description
Basically on startup the app will show
AScreenwith a variable value ofnilto display a loading screen. The deeplinker will parse the link into the following path[AScreen(value: 20), BScreen()]. Since the deeplinker usesreplace(path:)it will successfully replaceAScreenbut fails at presentingBScreen. Parsing the link so that the value ofAScreenis nil will presentBScreenfine. So it seems the issue is with the value changing.Steps to reproduce
Example App
Using the code below seems to solve the issue
Expected behavior
App should navigate to
BScreeneven when the value inAScreenchangesEnvironment
Additional context
Related: #74 (comment)