TangleViewModelKeysSubcomponent

interface TangleViewModelKeysSubcomponent

Used to provide viewModelKeys for use in the TangleViewModelFactory

Since

0.10.0

Properties

Link copied to clipboard
abstract val viewModelKeys: Set<Class<out ViewModel>>

Copy of all the keys contained in TangleViewModelProviderMap. TangleViewModelProviderMap is only provided by TangleViewModelMapSubcomponent, and a new subcomponent needs to be created for each viewModel injection, so it's inefficient to create the object before we know if the map holds the ViewModel. The TangleViewModelFactory checks this Set in order to determine whether the map holds a particular ViewModel type.

Sources

Link copied to clipboard