Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Created September 3, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchtabian/39dd23b5506fca140b992de2dd7f1f13 to your computer and use it in GitHub Desktop.
Save mitchtabian/39dd23b5506fca140b992de2dd7f1f13 to your computer and use it in GitHub Desktop.
return object: LiveData<MainViewState>(){
override fun onActive() {
super.onActive()
val blogList: ArrayList<BlogPost> = ArrayList()
blogList.add(
BlogPost(
pk = 0,
title = "Vancouver PNE 2019",
body = "Here is Jess and I at the Vancouver PNE. We ate a lot of food.",
image = "https://cdn.open-api.xyz/open-api-static/static-blog-images/image8.jpg"
)
)
blogList.add(
BlogPost(
pk = 1,
title = "Ready for a Walk",
body = "Here I am at the park with my dogs Kiba and Maizy. Maizy is the smaller one and Kiba is the larger one.",
image = "https://cdn.open-api.xyz/open-api-static/static-blog-images/image2.jpg"
)
)
value = MainViewState(
blogPosts = blogList
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment