Add some doc

This commit is contained in:
Benoit Marty 2019-07-17 11:58:18 +02:00
parent bb3b5788ba
commit 3651ec4870
1 changed files with 10 additions and 0 deletions

View File

@ -57,9 +57,15 @@ import im.vector.riotx.features.workers.signout.SignOutViewModel
interface ViewModelModule { interface ViewModelModule {
/**
* ViewModels with @IntoMap will be injected by this factory
*/
@Binds @Binds
fun bindViewModelFactory(factory: VectorViewModelFactory): ViewModelProvider.Factory fun bindViewModelFactory(factory: VectorViewModelFactory): ViewModelProvider.Factory
/**
* Below are bindings for the androidx view models (which extend ViewModel). Will be converted to MvRx ViewModel in the future.
*/
@Binds @Binds
@IntoMap @IntoMap
@ViewModelKey(SignOutViewModel::class) @ViewModelKey(SignOutViewModel::class)
@ -110,6 +116,10 @@ interface ViewModelModule {
@ViewModelKey(ConfigurationViewModel::class) @ViewModelKey(ConfigurationViewModel::class)
fun bindConfigurationViewModel(viewModel: ConfigurationViewModel): ViewModel fun bindConfigurationViewModel(viewModel: ConfigurationViewModel): ViewModel
/**
* Below are bindings for the MvRx view models (which extend VectorViewModel). Will be the only usage in the future.
*/
@Binds @Binds
fun bindHomeActivityViewModelFactory(factory: HomeActivityViewModel_AssistedFactory): HomeActivityViewModel.Factory fun bindHomeActivityViewModelFactory(factory: HomeActivityViewModel_AssistedFactory): HomeActivityViewModel.Factory