Last active
January 18, 2020 23:50
-
-
Save CostaFot/b6429b1b33576d91d300bad27e3c44f3 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
fun getRedditPost() { | |
viewModelScope.launch(Dispatchers.Main) { | |
stateData.value = State.Loading | |
val post: State.Post = redditRepository.getPost() | |
stateData.value = post | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment