Fixed Logics for collecting multiple flows inside lifecycle scope.
Fixes #444
Changes :
- Added repeatOnLifecycle() dependencies (implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0")
- Added logics for collecting multiple flows as:
`
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
launch {
flow1.collect { /* Handle */ }
}
launch {
flow2.collect { /* Handle */ }
}
launch {
flow3.collect { /* Handle */ }
}
}
}
`
Screenshots for the change :
Appetize link: https://appetize.io/app/x63j237cj2tjzgfwtv5fvk5qxa?device=pixel4&osVersion=11.0&scale=75
Edited by Subhadip