I'm trying Jetbrains Compose and Decompose for the...
# decompose
s
I'm trying Jetbrains Compose and Decompose for the first time. I'm building an app based on an example that uses a
ScreenConfig
sealed class for navigation, and a
ComponentContext.router
that constructs the screen that is needed for every
pop
and
push
. This all works fine for a single window application, but now that I want a second window I'm having some trouble. I created a
@Composable
with a
Window
at the top-level, created an entry in the
ScreenConfig
for it, as I did for other navigation destinations. When that destination is reached the initial window content becomes blank, and the new window appears correctly. I've used GitHub search but haven't managed to find a sample repository that handles multiple windows with Decompose. The only documentation I can find is unrelated Decompose.
Is there some particular way to trigger a new window to be opened without affecting the existing one?
a
i handle it in the desktop specific module (not source set), that way on Android it can open another Activity, I'm not at a computer right now so cant provide an example, sorry 😕
s
Ah, my app is desktop only, just a single module.
a
I played with windows a while ago - https://pastebin.com/K66P08Yj
s
Awesome, looks good at first glance. I'll try to give it a go later and see how it goes. Thank you very much for your help. 🙂
👍 1