Replace path and go to path in the navigator should navigate back to the last matching path element and only then show the non-matching part of the routing path.
Currently, both functions do not set the hasAppeared flag to false. This behaviour can be tested in the example app by opening detail settings 1 and tapping on "Go to detail settings 0".
Expected behaviour:
Application navigates back to Home Screen, then pushes detail 0, presents detail settings 0.
Observed behaviour:
Application navigates back to Detail Screen, replacing detail 1 with detail 0, navigation no longer works as routing path is broken.
Fix:
Set hasAppeared of the last matching path element to false, if it is not the last element in the routing path.
Replace path and go to path in the navigator should navigate back to the last matching path element and only then show the non-matching part of the routing path.
Currently, both functions do not set the hasAppeared flag to false. This behaviour can be tested in the example app by opening detail settings 1 and tapping on "Go to detail settings 0".
Expected behaviour: Application navigates back to Home Screen, then pushes detail 0, presents detail settings 0.
Observed behaviour: Application navigates back to Detail Screen, replacing detail 1 with detail 0, navigation no longer works as routing path is broken.
Fix: Set hasAppeared of the last matching path element to false, if it is not the last element in the routing path.