Created
March 20, 2019 19:01
-
-
Save tfcporciuncula/9e3ca257cce46d78481a12309c0bc18e to your computer and use it in GitHub Desktop.
BestPostActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val viewModel by lazy { | |
// this is what we had | |
//ViewModelProviders.of(this, injector.bestPostViewModelFactory()).get(BestPostViewModel::class.java) | |
// this is what we want now | |
val viewModelFactory = injector.with(BestPostModule(myIntFromView = 10)).bestPostViewModelFactory() | |
ViewModelProviders.of(this, viewModelFactory).get(BestPostViewModel::class.java) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment