Last active
May 11, 2020 04:44
-
-
Save ahinchman1/b429ee29c639a7391a599d16bd91ddae to your computer and use it in GitHub Desktop.
This file contains 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
sealed class MainActivityViewState { | |
object Loading : MainActivityViewState() | |
object Content : MainActivityViewState() | |
} | |
class MainActivityViewModel: ViewModel() { | |
private val _viewState = MutableLiveData<MainActivityViewState>() | |
val viewState: LiveData<MainActivityViewState> = _viewState | |
init { | |
_viewState.value = MainActivityViewState.Loading | |
loadContent() | |
} | |
private fun loadContent() { | |
navigator.navigateToInvasiveSpeciesMap() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment