Hello! I am trying to zip 3 flows: ``` val...
# coroutines
y
Hello! I am trying to zip 3 flows:
Copy code
val flow1 : Item = getDbDataFLow1()
        val flow2 : Item = getDbDataFLow2()
        val flow3 : List<Item> = getDbDataFLow3()

        flow1.zip(flow2) {a,b->
            if(b.isOk())
                listOf(a, b)
            else
                listOf(a)

        }.zip(flow3) { ab, c ->
            ab+c
        }.collect{
            println(it)
        }
but when i am updating db record which corresponds flow1, flow1 and flow2 are triggering but nothing goes to second zip, so I fixed this in following ugly way
Copy code
flow1.zip(flow2) {a,b->
            if(b.isOk())
                listOf(a, b)
            else
                listOf(a)

        }.collect{
            listOf(it)
                .asFlow()
                .zip(flow3) { ab, c ->
                ab+c
                }.collect{
                    println(it)
                }
        }
Could anyone help to understand what is wrong with original code, and how to change it in a good way?