Pablo
09/29/2020, 12:29 PMviewModel
from now, so I don't have the coroutineScope on my presenter
and one way I'm doing right now is I'm injecting with Dagger
a CoroutineScope
as follows :
@Module
object CoroutineMainScopeModule{
@Provides
fun provideCoroutineMainScope() : CoroutineScope : MainScope()
}
But I don't know if I'd have problems in the future, cna someone let me know the disvantages of doing that way?
I also don't want to implement CoroutineScope
on the presenter because I read it's a bad praxis, neither use GlobalScope
.
I'm afraid because I don't have a Job
there, well I mean yes, I have a ContextScope(SupervisorJob() + Dispatchers.Main)
but in case I wanted to do things with different jobs, would be a problem there?antonioleiva
09/29/2020, 12:36 PMantonioleiva
09/29/2020, 12:37 PMlifecycleScope
from the activityantonioleiva
09/29/2020, 12:38 PMgildor
09/29/2020, 12:48 PMgildor
09/29/2020, 12:52 PMgildor
09/29/2020, 12:53 PMgildor
09/29/2020, 12:59 PM