Created
April 25, 2020 18:30
-
-
Save naltynbekkz/583010475e5d5d902e011735665f7ae0 to your computer and use it in GitHub Desktop.
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
class BlogViewModel @AssistedInject constructor( | |
@Assisted private val savedStateHandle: SavedStateHandle, | |
blogsRepository: BlogsRepository | |
) : ViewModel() { | |
@AssistedInject.Factory | |
interface Factory : ViewModelAssistedFactory<BlogViewModel> | |
val blog = blogsRepository.getBlog(savedStateHandle.get("blog_id")!!) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment