Skip to content

Instantly share code, notes, and snippets.

@jutikorn
Created November 17, 2018 16:14
Show Gist options
  • Save jutikorn/6b1a084460581b8c9d39d01c713880f9 to your computer and use it in GitHub Desktop.
Save jutikorn/6b1a084460581b8c9d39d01c713880f9 to your computer and use it in GitHub Desktop.
class SearchRepositoriesViewModel(private val repository: GithubRepository) : ViewModel() {
private val queryLiveData = MutableLiveData<String>()
/**
* Search a repository based on a query string.
*/
fun searchRepo(queryString: String) {
queryLiveData.postValue(queryString)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment