miqbaldc
07/26/2020, 9:15 PMviewModelScope
?
Moved to this issue instead with more details and examples: https://github.com/google/dagger/issues/2004gildor
07/27/2020, 2:03 AMviewModelScope.coroutineContext[CoroutineDispatcher]!!
miqbaldc
07/27/2020, 12:21 PMCoroutineScope
instead. But still compile error because I still don’t know how to provide dependency inside view model like the abovegildor
07/27/2020, 12:22 PMgildor
07/27/2020, 12:24 PMgildor
07/27/2020, 12:24 PMmiqbaldc
07/27/2020, 12:30 PM@DisableInstallInCheck
@Module
interface ViewModelModule {
@get:[Binds LoginScope IntoMap ViewModelKey(LoginViewModel::class)]
val LoginViewModel.loginViewModel: ViewModel
companion object {
@Provides
fun provideLoginViewModelScope(viewModel: LoginViewModel): CoroutineScope = viewModel.viewModelScope
}
}
miqbaldc
07/27/2020, 12:31 PM@DisableInstallInCheck
in @Module
configured inside DFMgildor
07/27/2020, 12:32 PMmiqbaldc
07/27/2020, 12:32 PMgildor
07/27/2020, 12:34 PMmiqbaldc
07/27/2020, 12:36 PM