Is there any default solution in compose for not l...
# compose-desktop
l
Is there any default solution in compose for not launching the app twice?
l
What do you mean by ‘launching the app twice’? If you’re referring to an action in composition, you can use LaunchedEffect(Unit), and the lambda should only run once.
l
No, i mean like avoid launching the process twice
And ideally bringing the already running process to foreground
l
I am using a similar approach but it seems very hacky I wonder how toolbox does it
t
I think the best way to do this is to implement it in the native launcher directly. So that means no jpackage. Because coding it in Java will always cause a delay of around a second or so.