<How to wait result from OKHTTP response without f...
# stackoverflow
u
How to wait result from OKHTTP response without freezing app Kotlin? I am writing a small application in Kotlin with JetpackCompose and my application freezes (CountDownLatch) when a request is called, is there any way to avoid this? Without CountDownLatch, okhttp does not have time to return the result before the method completes. MainActivity.kt fun infoServer() { val viewModel = ViewModelProvider(this).get(MainActivityViewModel::class.java) var txt = remember { mutableStateOf(0) } Column( horizontalAlignment =...