Jorge Castillo
01/09/2020, 8:10 AMmiqbaldc
01/09/2020, 10:14 AMBIO<E, A>
looks promising 😄 hopefully it’s release soonmiqbaldc
01/09/2020, 10:16 AMservice.loadAllSpeakers()
i wanna ask about the above method, by reading your post, I assume that return plain List<Speaker>
cmiiw?
also, do you have any recommendation to combine it with coroutine? or by using IO
I don’t have to make my code like this, except using (cancelation) or, arrow already provide that as well?
interface SpeakerService {
fun loadAllSpeakers(): Flow<List<Speaker>>
// or suspend function
suspend fun loadAllSpeakers(): List<Speaker>
}
Jorge Castillo
01/09/2020, 10:46 AMloadAllSpeakers()
just retunrs the plain list of speakers.Jorge Castillo
01/09/2020, 10:47 AMJorge Castillo
01/09/2020, 10:48 AMJorge Castillo
01/09/2020, 10:48 AMmiqbaldc
01/09/2020, 12:24 PMmiqbaldc
01/09/2020, 12:24 PMRoom
using Flow
(for local data source), Retrofit
service that return an IO
but also mapping to be inserted/updated to SQLite.Jorge Castillo
01/09/2020, 12:28 PMmiqbaldc
01/09/2020, 1:17 PMIO
better for one-shot operation?simon.vergauwen
01/09/2020, 1:20 PMJorge Castillo
01/09/2020, 1:21 PM