Ayomide
01/03/2021, 2:58 PMSharedFlow
- I'm trying to figure out how to keep the web socket session (DefaultClientWebSocketSession
) running in the background so that I can collect the SharedFlow
messages and display them on screen as they stream in into a LazyColumn
or similar. I'm not sure how to fit this into Compose's state tools.
I tried using coroutineScope.launch{}
with rememberCoroutineScope()
but it seems like the web socket session would stop as soon as the coroutine scope ended.ahulyk
01/03/2021, 3:25 PMAyomide
01/03/2021, 3:44 PM