https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
s

Sean Proctor

07/28/2022, 11:15 AM
@Arkadii Ivanov In Decompose, why can't configurations on the stack be duplicated?
I have a use case that I'm not sure how to handle otherwise. From my customer screen, I show a list of tickets that can be navigated to and from the ticket screen, the customer can be navigated to. I can avoid the cycle, but it would make the back navigation a bit surprising to the user.
a

Arkadii Ivanov

07/28/2022, 11:31 AM
Please see the explanation - https://github.com/arkivanov/Decompose/discussions/51 For your case, you can either add an
index
argument to your configuration or any other argument to make the configuration unique. Or actually use
bringToFront
to avoid long back stacks, which also could be inconvenient for users.
s

Sean Proctor

07/28/2022, 11:45 AM
Ah! Thanks! Without that explanation the behavior is a bit baffling. I think bringToFront will work well for me.
a

Arkadii Ivanov

07/28/2022, 11:47 AM
Yeah, there is also a documentation page you might be interested in - https://arkivanov.github.io/Decompose/child-stack/overview/#component-configurations
s

Sean Proctor

07/28/2022, 1:42 PM
I just wanted to say thanks again. I just finished upgrading from 0.7 to 0.8 and got to test
bringToFront
. It fixes my issue and I think the UX is ok. This library has been really helpful for me to add desktop support.
a

Arkadii Ivanov

07/28/2022, 1:49 PM
Thanks for the feedback!
9 Views