jw
07/01/2020, 5:18 PMwithContext
Mustafa Ozhan
07/19/2022, 9:13 AMfun getActiveCurrencies() = currencyQueries
.getActiveCurrencies()
.asFlow()
.flowOn(ioDispatcher)
.mapToList(ioDispatcher)
be enough ? or should we still call with withContext
like this?
suspend fun getActiveCurrencies() = withContext(ioDispatcher) {
currencyQueries
.getActiveCurrencies()
.asFlow()
.flowOn(ioDispatcher)
.mapToList(ioDispatcher)
}
jw
07/19/2022, 12:58 PMMustafa Ozhan
08/07/2022, 10:54 PMwithContext
and suspend
makes perfect sense, but I confused about removing the flowOn(ioDispatcher)
is SQLDelight emitting value changes on IO thread ?jw
08/07/2022, 10:56 PMMustafa Ozhan
08/07/2022, 11:00 PM