Nikhil Parab
09/14/2024, 10:15 AMPagingData
flows into a single list. Specifically, I need to call the paging flow twice with different requests and then merge the results into one unified list.
Currently, I have the following code to generate multiple PagingData
flows:
val pagingDataFlows = selectedLineIds.map { lineId ->
val params = mapOf(
"lines" to lineId.toString(),
"status" to filters.status.toString(),
"sort" to filters.sort
)
ticketRepository.getTickets(params)
}
I want to merge the results from these flows so that they appear as a single list instead of flowing separately. How can I achieve this?
Any suggestions on how to properly combine these PagingData
flows into one?
Thanks!Chrimaeon
09/14/2024, 10:36 AMNikhil Parab
09/14/2024, 4:56 PMChrimaeon
09/14/2024, 5:10 PM