https://kotlinlang.org logo
#codereview
Title
# codereview
k

KV

06/16/2021, 1:41 PM
What is the best way to write the below code?
Copy code
viewLifecycleOwner.lifecycleScope.launch {
            viewLifecycleOwner.lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) {
                launch {
                    collectABCState()
                }

                launch {
                    collectABCInfo()
                }

                launch {
                    collectXYZFailedEvents()
                }

                launch {
                    collectABCTime()
                }

                launch {
                    collectABCSummary()
                }
            }
e

eneim

06/21/2021, 1:55 AM
stateFlow.onEach(::consumeState).launchIn(scope)
infoFlow.onEach(::consumeInfo).launchIn(scope)
...
🤔
3 Views