Is there any default solution in compose for not launching the app twice?
l
Landry Norris
08/29/2022, 7:02 PM
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
Lucas
08/29/2022, 7:34 PM
No, i mean like avoid launching the process twice
Lucas
08/29/2022, 7:35 PM
And ideally bringing the already running process to foreground
I am using a similar approach but it seems very hacky
I wonder how toolbox does it
t
Thomas
08/31/2022, 8:23 PM
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.