Hello everyone, I'm trying applying compose-destin...
# compose-destinations
c
Hello everyone, I'm trying applying compose-destination on my project (Previously I used kiwi but it stopped updating) I have a scenario: screenA -> screenB -> screenC -> get a result and back to screenA And I found
ResultBackNavigator.navigateBack()
use
NavController.navigateUp()
internally (In kiwi it doesn't contain navigateUp, so we can popBackStack manually) Is there any way to solve this problem?
d
I guess you could chain the
ResultBackNavigator
? An alternative would be to navigate to
ScreenA
with
popUpTo
and a argument?
r
Result Back feature is type safe, for us to allow returning a result to any screen in the back stack, all those would have to receive a type safe result recipient. So, the feature considers screen C a child of B, or internal detail of B. In that sense returning a result from C to A doesn’t make sense. You can always set that up manually the way you would with official navigation, but if you’re using this type safe feature, then you need to pass the result to B and then B decides to also pass it back to A.
👍 2
c
@David Thanks for the idea, it does work But also have side effect on other scenario... I'll keep this solution @Rafael Costa Thanks for replying! But screenB as a intermediate screen (and also able to be back in other scenario) is the scenario I need... It's a very rare case indeed