Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save juliuscanute/f4299121860f4933547d90a28d82858e to your computer and use it in GitHub Desktop.
Save juliuscanute/f4299121860f4933547d90a28d82858e to your computer and use it in GitHub Desktop.
Data source factory
class DictionaryAllWordsDataSourceFactory(
private val repository: Repository,
private val networkState: MutableLiveData<Event<NetworkMessage>>
) :
DataSource.Factory<Int, Meaning>() {
override fun create(): DataSource<Int, Meaning> {
return DictionaryAllWordsDataSource(repository, networkState)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment